KWin
|
Class representing a Window's Shadow to be rendered by the Compositor. More...
#include <shadow.h>
Public Slots | |
void | geometryChanged () |
Signals | |
void | offsetChanged () |
void | rectChanged () |
void | textureChanged () |
Public Member Functions | |
Shadow (Window *window) | |
~Shadow () override | |
bool | updateShadow () |
Window * | window () const |
bool | hasDecorationShadow () const |
QImage | decorationShadowImage () const |
std::weak_ptr< KDecoration2::DecorationShadow > | decorationShadow () const |
QSize | elementSize (ShadowElements element) const |
QRectF | rect () const |
QMargins | offset () const |
const QImage & | shadowElement (ShadowElements element) const |
Static Public Member Functions | |
static std::unique_ptr< Shadow > | createShadow (Window *window) |
Class representing a Window's Shadow to be rendered by the Compositor.
This class holds all information about the Shadow to be rendered together with the window during the Compositing stage. The Shadow consists of several pixmaps and offsets. For a complete description please refer to https://community.kde.org/KWin/Shadow
To create a Shadow instance use the static factory method createShadow which will create an instance for the currently used Compositing Backend. It will read the X11 Property and create the Shadow and all required data (such as WindowQuads). If there is no Shadow defined for the Window the factory method returns NULL
.
|
explicit |
Definition at line 30 of file shadow.cpp.
|
override |
Definition at line 38 of file shadow.cpp.
Factory Method to create the shadow from the property. This method takes care of creating an instance of the Shadow class for the current Compositing Backend.
If there is no shadow defined for window
this method will return NULL
.
window | The Window for which the shadow should be created |
NULL
in case there is no shadow defined. Definition at line 42 of file shadow.cpp.
|
inline |
QImage KWin::Shadow::decorationShadowImage | ( | ) | const |
Definition at line 323 of file shadow.cpp.
QSize KWin::Shadow::elementSize | ( | Shadow::ShadowElements | element | ) | const |
Definition at line 331 of file shadow.cpp.
|
slot |
Definition at line 314 of file shadow.cpp.
|
signal |
|
signal |
|
inline |
|
signal |
bool KWin::Shadow::updateShadow | ( | ) |
This method updates the Shadow when the property has been changed. It is the responsibility of the owner of the Shadow to call this method whenever the owner receives a PropertyNotify event. This method will invoke a re-read of the Property. In case the Property has been withdrawn the method returns false
. In that case the owner should delete the Shadow.
true
when the shadow has been updated, false
if the property is not set anymore. Definition at line 265 of file shadow.cpp.
Window * KWin::Shadow::window | ( | ) | const |
Definition at line 309 of file shadow.cpp.