• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kde-workspace API Reference
  • KDE Home
  • Contact Us
 

KWin

  • KWin
  • Compositor
Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | List of all members
KWin::Compositor Class Reference

#include <composite.h>

Inheritance diagram for KWin::Compositor:
Inheritance graph
[legend]

Public Types

enum  SuspendReason {
  NoReasonSuspend = 0, UserSuspend = 1<<0, BlockRuleSuspend = 1<<1, ScriptSuspend = 1<<2,
  AllReasonSuspend = 0xff
}
 

Public Slots

void addRepaintFull ()
 
void checkUnredirect ()
 
void checkUnredirect (bool force)
 
Q_SCRIPTABLE void resume ()
 
void resume (Compositor::SuspendReason reason)
 
void scheduleRepaint ()
 
Q_SCRIPTABLE void setCompositing (bool active)
 
void slotReinitialize ()
 
void slotToggleCompositing ()
 
Q_SCRIPTABLE void suspend ()
 
void suspend (Compositor::SuspendReason reason)
 
Q_SCRIPTABLE void toggleCompositing ()
 
void updateCompositeBlocking ()
 
void updateCompositeBlocking (KWin::Client *c)
 

Signals

Q_SCRIPTABLE void compositingToggled (bool active)
 

Public Member Functions

 ~Compositor ()
 
void addRepaint (const QRect &r)
 
void addRepaint (const QRegion &r)
 
void addRepaint (int x, int y, int w, int h)
 
bool checkForOverlayWindow (WId w) const
 
QString compositingNotPossibleReason () const
 
QString compositingType () const
 
bool hasScene () const
 
bool isActive ()
 
bool isCompositingPossible () const
 
bool isOpenGLBroken () const
 
bool isOverlayWindowVisible () const
 
void keepSupportProperty (xcb_atom_t atom)
 
void lastFrameRendered ()
 
WId overlayWindow () const
 
void removeSupportProperty (xcb_atom_t atom)
 
Scene * scene ()
 
void setCompositeResetTimer (int msecs)
 
void setOverlayWindowVisibility (bool visible)
 
int xrrRefreshRate () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual  ~QObject ()
 
bool blockSignals (bool block)
 
QObject * child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArray > dynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
T findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObject * metaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObject * parent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThread * thread () const
 

Static Public Member Functions

static bool compositing ()
 
static bool isCreated ()
 
- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
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)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 

Protected Member Functions

void timerEvent (QTimerEvent *te)
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 

Properties

bool active
 
QString compositingNotPossibleReason
 
bool compositingPossible
 
QString compositingType
 
bool openGLIsBroken
 
- Properties inherited from QObject
 objectName
 

Additional Inherited Members

- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 

Detailed Description

Definition at line 52 of file composite.h.

Member Enumeration Documentation

enum KWin::Compositor::SuspendReason
Enumerator
NoReasonSuspend 
UserSuspend 
BlockRuleSuspend 
ScriptSuspend 
AllReasonSuspend 

Definition at line 83 of file composite.h.

Constructor & Destructor Documentation

KWin::Compositor::~Compositor ( )

Definition at line 133 of file composite.cpp.

Member Function Documentation

void KWin::Compositor::addRepaint ( const QRect &  r)

Definition at line 533 of file composite.cpp.

void KWin::Compositor::addRepaint ( const QRegion &  r)

Definition at line 541 of file composite.cpp.

void KWin::Compositor::addRepaint ( int  x,
int  y,
int  w,
int  h 
)

Definition at line 525 of file composite.cpp.

void KWin::Compositor::addRepaintFull ( )
slot

Definition at line 549 of file composite.cpp.

bool KWin::Compositor::checkForOverlayWindow ( WId  w) const

Checks whether w is the Scene's overlay window.

Definition at line 779 of file composite.cpp.

void KWin::Compositor::checkUnredirect ( )
slot

Definition at line 735 of file composite.cpp.

void KWin::Compositor::checkUnredirect ( bool  force)
slot

Definition at line 741 of file composite.cpp.

static bool KWin::Compositor::compositing ( )
inlinestatic

Static check to test whether the Compositor is available and active.

Returns
bool true if there is a Compositor and it is active, false otherwise

Definition at line 148 of file composite.h.

QString KWin::Compositor::compositingNotPossibleReason ( ) const
Q_SCRIPTABLE void KWin::Compositor::compositingToggled ( bool  active)
signal
QString KWin::Compositor::compositingType ( ) const
bool KWin::Compositor::hasScene ( ) const
inline

Definition at line 101 of file composite.h.

bool KWin::Compositor::isActive ( )

Whether the Compositor is active.

That is a Scene is present and the Compositor is not shutting down itself.

Definition at line 730 of file composite.cpp.

bool KWin::Compositor::isCompositingPossible ( ) const

Definition at line 822 of file composite.cpp.

static bool KWin::Compositor::isCreated ( )
inlinestatic

Checks whether the Compositor has already been created by the Workspace.

This method can be used to check whether self will return the Compositor instance or null.

Returns
bool true if the Compositor has been created, false otherwise

Definition at line 140 of file composite.h.

bool KWin::Compositor::isOpenGLBroken ( ) const

Definition at line 832 of file composite.cpp.

bool KWin::Compositor::isOverlayWindowVisible ( ) const
Returns
Whether the Scene's Overlay X Window is visible.

Definition at line 804 of file composite.cpp.

void KWin::Compositor::keepSupportProperty ( xcb_atom_t  atom)

Definition at line 360 of file composite.cpp.

void KWin::Compositor::lastFrameRendered ( )

Hook for the Scene to notify about a that the last frame got rendered.

In case the Compositor was waiting for the frame being rendered, the next rendering process is triggered.

Definition at line 565 of file composite.cpp.

WId KWin::Compositor::overlayWindow ( ) const
Returns
The Scene's Overlay X Window.

Definition at line 793 of file composite.cpp.

void KWin::Compositor::removeSupportProperty ( xcb_atom_t  atom)

Definition at line 365 of file composite.cpp.

Q_SCRIPTABLE void KWin::Compositor::resume ( )
inlineslot

Resumes the Compositor if it is currently suspended.

Note: it is possible that the Compositor cannot be resumed, that is there might be Clients blocking the usage of Compositing or the Scene might be broken. Use to check whether the Compositor has been resumed. Also check isCompositingPossible and isOpenGLBroken. Note: The starting of the Compositor can require some time and is partially done threaded. After this method returns the setup may not have been completed. void suspend isActive isCompositingPossible isOpenGLBroken

Definition at line 201 of file composite.h.

void KWin::Compositor::resume ( Compositor::SuspendReason  reason)
slot

Definition at line 498 of file composite.cpp.

Scene* KWin::Compositor::scene ( )
inline

Definition at line 129 of file composite.h.

void KWin::Compositor::scheduleRepaint ( )
slot

Schedules a new repaint if no repaint is currently scheduled.

Definition at line 287 of file composite.cpp.

void KWin::Compositor::setCompositeResetTimer ( int  msecs)

Definition at line 669 of file composite.cpp.

void KWin::Compositor::setCompositing ( bool  active)
slot

Tries to suspend or resume the Compositor based on active.

In case the Compositor is already in the asked for state this method is doing nothing. In case it does not match it is tried to either resume or suspend the Compositor.

Note: these operations may fail. There is no guarantee that after calling this method to enable/disable the Compositor, it actually changes to the state. Use to check the actual state of the Compositor. Note: The starting of the Compositor can require some time and is partially done threaded. After this method returns the setup may not have been completed. Note: This function only impacts whether compositing is suspended or resumed by scripts or dbus calls. Compositing may be suspended for user will or a window rule - no matter how often you call this function! active Whether the Compositor should be resumed (true or suspended (false void suspend resume isActive isCompositingPossible isOpenGLBroken

Definition at line 505 of file composite.cpp.

void KWin::Compositor::setOverlayWindowVisibility ( bool  visible)

Set's the Scene's Overlay X Window visibility to visible.

Definition at line 815 of file composite.cpp.

void KWin::Compositor::slotReinitialize ( )
slot

Re-initializes the Compositor completely.

Connected to the D-Bus signal org.kde.KWin /KWin reinitCompositing

Definition at line 411 of file composite.cpp.

void KWin::Compositor::slotToggleCompositing ( )
slot

Actual slot to perform the toggling compositing.

That is if the Compositor is suspended it will be resumed and if the Compositor is active it will be suspended. Invoked primarily by the keybinding. TODO: make private slot

Definition at line 429 of file composite.cpp.

Q_SCRIPTABLE void KWin::Compositor::suspend ( )
inlineslot

Suspends the Compositor if it is currently active.

Note: it is possible that the Compositor is not able to suspend. Use to check whether the Compositor has been suspended. void resume isActive

Definition at line 182 of file composite.h.

void KWin::Compositor::suspend ( Compositor::SuspendReason  reason)
slot

Definition at line 488 of file composite.cpp.

void KWin::Compositor::timerEvent ( QTimerEvent *  te)
protectedvirtual

Reimplemented from QObject.

Definition at line 557 of file composite.cpp.

void KWin::Compositor::toggleCompositing ( )
slot

Called from the D-Bus interface.

Does the same as slotToggleCompositing with the addition to show a notification on how to revert the compositing state.

See also
resume
suspend
Deprecated:
Use suspend or resume instead

Definition at line 443 of file composite.cpp.

void KWin::Compositor::updateCompositeBlocking ( )
slot

Definition at line 458 of file composite.cpp.

void KWin::Compositor::updateCompositeBlocking ( KWin::Client *  c)
slot

Definition at line 463 of file composite.cpp.

int KWin::Compositor::xrrRefreshRate ( ) const
inline

Definition at line 96 of file composite.h.

Property Documentation

bool KWin::Compositor::active
read

Whether the Compositor is active.

That is a Scene is present and the Compositor is not shutting down itself.

Definition at line 59 of file composite.h.

QString KWin::Compositor::compositingNotPossibleReason
read

The reason why compositing is not possible.

Empty String if compositing is possible.

Definition at line 68 of file composite.h.

bool KWin::Compositor::compositingPossible
read

Whether compositing is possible.

Mostly means whether the required X extensions are available.

Definition at line 64 of file composite.h.

QString KWin::Compositor::compositingType
read

The type of the currently used Scene:

  • none No Compositing
  • xrender XRender
  • gl1 OpenGL 1
  • gl2 OpenGL 2
  • gles OpenGL ES 2

Definition at line 81 of file composite.h.

bool KWin::Compositor::openGLIsBroken
read

Whether OpenGL has failed badly in the past (crash) and is considered as broken.

Definition at line 72 of file composite.h.


The documentation for this class was generated from the following files:
  • composite.h
  • composite.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Mon Dec 9 2019 01:34:31 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KWin

Skip menu "KWin"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kde-workspace API Reference

Skip menu "kde-workspace API Reference"
  • KWin
  •   KWin Decoration Library
  •   KWin Effects Library
  • Plasma
  • Plasma
  •   Applets
  •   Engines
  •   libkworkspace
  •   libtaskmanager
  • System Settings
  •   SystemSettingsView

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal