KWin
Loading...
Searching...
No Matches
Namespaces | Classes | Macros | Enumerations | Enumerator | Functions | Variables | Public Slots
KWin effects library

Namespaces

namespace  KWin
 

Classes

class  KWin::PaintData
 
class  KWin::WindowPrePaintData
 
class  KWin::WindowPaintData
 
class  KWin::ScreenPrePaintData
 
class  KWin::Effect
 Base class for all KWin effects. More...
 
class  KWin::EffectPluginFactory
 

Macros

#define KWIN_EFFECT_API_MAKE_VERSION(major, minor)   ((major) << 8 | (minor))
 
#define KWIN_EFFECT_API_VERSION_MAJOR   0
 
#define KWIN_EFFECT_API_VERSION_MINOR   236
 
#define KWIN_EFFECT_API_VERSION
 
#define EffectPluginFactory_iid   "org.kde.kwin.EffectPluginFactory" KWIN_PLUGIN_VERSION_STRING
 
#define KWIN_PLUGIN_FACTORY_NAME   KPLUGINFACTORY_PLUGIN_CLASS_INTERNAL_NAME
 
#define KWIN_EFFECT_FACTORY_SUPPORTED_ENABLED(className, jsonFile, supported, enabled)
 
#define KWIN_EFFECT_FACTORY_ENABLED(className, jsonFile, enabled)    KWIN_EFFECT_FACTORY_SUPPORTED_ENABLED(className, jsonFile, return true;, enabled)
 
#define KWIN_EFFECT_FACTORY_SUPPORTED(className, jsonFile, supported)    KWIN_EFFECT_FACTORY_SUPPORTED_ENABLED(className, jsonFile, supported, return true;)
 
#define KWIN_EFFECT_FACTORY(className, jsonFile)    KWIN_EFFECT_FACTORY_SUPPORTED_ENABLED(className, jsonFile, return true;, return true;)
 

Enumerations

enum  {
  KWin::Effect::PAINT_WINDOW_OPAQUE = 1 << 0 , KWin::Effect::PAINT_WINDOW_TRANSLUCENT = 1 << 1 , KWin::Effect::PAINT_WINDOW_TRANSFORMED = 1 << 2 , KWin::Effect::PAINT_SCREEN_REGION = 1 << 3 ,
  KWin::Effect::PAINT_SCREEN_TRANSFORMED = 1 << 4 , KWin::Effect::PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS = 1 << 5 , KWin::Effect::PAINT_SCREEN_BACKGROUND_FIRST = 1 << 6
}
 
enum  KWin::Effect::Feature {
  KWin::Effect::Nothing = 0 , KWin::Effect::ScreenInversion , KWin::Effect::Blur , KWin::Effect::Contrast ,
  KWin::Effect::HighlightWindows
}
 
enum  KWin::Effect::ReconfigureFlag { KWin::Effect::ReconfigureAll = 1 << 0 }
 

Functions

virtual KWin::PaintData::~PaintData ()
 
qreal KWin::PaintData::xScale () const
 
qreal KWin::PaintData::yScale () const
 
qreal KWin::PaintData::zScale () const
 
void KWin::PaintData::setXScale (qreal scale)
 
void KWin::PaintData::setYScale (qreal scale)
 
void KWin::PaintData::setZScale (qreal scale)
 
void KWin::PaintData::setScale (const QVector2D &scale)
 
void KWin::PaintData::setScale (const QVector3D &scale)
 
const QVector3D & KWin::PaintData::scale () const
 
const QVector3D & KWin::PaintData::translation () const
 
qreal KWin::PaintData::xTranslation () const
 
qreal KWin::PaintData::yTranslation () const
 
qreal KWin::PaintData::zTranslation () const
 
void KWin::PaintData::setXTranslation (qreal translate)
 
void KWin::PaintData::setYTranslation (qreal translate)
 
void KWin::PaintData::setZTranslation (qreal translate)
 
void KWin::PaintData::translate (qreal x, qreal y=0.0, qreal z=0.0)
 
void KWin::PaintData::translate (const QVector3D &translate)
 
void KWin::PaintData::setRotationAngle (qreal angle)
 
qreal KWin::PaintData::rotationAngle () const
 
void KWin::PaintData::setRotationOrigin (const QVector3D &origin)
 
QVector3D KWin::PaintData::rotationOrigin () const
 
void KWin::PaintData::setRotationAxis (const QVector3D &axis)
 
void KWin::PaintData::setRotationAxis (Qt::Axis axis)
 
QVector3D KWin::PaintData::rotationAxis () const
 
QMatrix4x4 KWin::PaintData::toMatrix (qreal deviceScale) const
 
 KWin::PaintData::PaintData ()
 
 KWin::PaintData::PaintData (const PaintData &other)
 
void KWin::WindowPrePaintData::setTranslucent ()
 
void KWin::WindowPrePaintData::setTransformed ()
 
 KWin::WindowPaintData::WindowPaintData ()
 
 KWin::WindowPaintData::WindowPaintData (const QMatrix4x4 &projectionMatrix)
 
 KWin::WindowPaintData::WindowPaintData (const WindowPaintData &other)
 
 KWin::WindowPaintData::~WindowPaintData () override
 
WindowPaintDataKWin::WindowPaintData::operator*= (qreal scale)
 
WindowPaintDataKWin::WindowPaintData::operator*= (const QVector2D &scale)
 
WindowPaintDataKWin::WindowPaintData::operator*= (const QVector3D &scale)
 
WindowPaintDataKWin::WindowPaintData::operator+= (const QPointF &translation)
 
WindowPaintDataKWin::WindowPaintData::operator+= (const QPoint &translation)
 
WindowPaintDataKWin::WindowPaintData::operator+= (const QVector2D &translation)
 
WindowPaintDataKWin::WindowPaintData::operator+= (const QVector3D &translation)
 
qreal KWin::WindowPaintData::opacity () const
 
void KWin::WindowPaintData::setOpacity (qreal opacity)
 
qreal KWin::WindowPaintData::multiplyOpacity (qreal factor)
 
qreal KWin::WindowPaintData::saturation () const
 
void KWin::WindowPaintData::setSaturation (qreal saturation) const
 
qreal KWin::WindowPaintData::multiplySaturation (qreal factor)
 
qreal KWin::WindowPaintData::brightness () const
 
void KWin::WindowPaintData::setBrightness (qreal brightness)
 
qreal KWin::WindowPaintData::multiplyBrightness (qreal factor)
 
int KWin::WindowPaintData::screen () const
 
void KWin::WindowPaintData::setScreen (int screen) const
 
void KWin::WindowPaintData::setCrossFadeProgress (qreal factor)
 Sets the cross fading factor to fade over with previously sized window. If 1.0 only the current window is used, if 0.0 only the previous window is used.
 
qreal KWin::WindowPaintData::crossFadeProgress () const
 
void KWin::WindowPaintData::setProjectionMatrix (const QMatrix4x4 &matrix)
 
QMatrix4x4 KWin::WindowPaintData::projectionMatrix () const
 
QMatrix4x4 & KWin::WindowPaintData::rprojectionMatrix ()
 
 KWin::Effect::Effect (QObject *parent=nullptr)
 
 KWin::Effect::~Effect () override
 
virtual void KWin::Effect::reconfigure (ReconfigureFlags flags)
 
virtual void KWin::Effect::prePaintScreen (ScreenPrePaintData &data, std::chrono::milliseconds presentTime)
 
virtual void KWin::Effect::paintScreen (const RenderTarget &renderTarget, const RenderViewport &viewport, int mask, const QRegion &region, Output *screen)
 
virtual void KWin::Effect::postPaintScreen ()
 
virtual void KWin::Effect::prePaintWindow (EffectWindow *w, WindowPrePaintData &data, std::chrono::milliseconds presentTime)
 
virtual void KWin::Effect::paintWindow (const RenderTarget &renderTarget, const RenderViewport &viewport, EffectWindow *w, int mask, QRegion region, WindowPaintData &data)
 
virtual void KWin::Effect::postPaintWindow (EffectWindow *w)
 
virtual bool KWin::Effect::provides (Feature)
 
virtual bool KWin::Effect::perform (Feature feature, const QVariantList &arguments)
 
virtual void KWin::Effect::drawWindow (const RenderTarget &renderTarget, const RenderViewport &viewport, EffectWindow *w, int mask, const QRegion &region, WindowPaintData &data)
 
virtual void KWin::Effect::windowInputMouseEvent (QEvent *e)
 
virtual void KWin::Effect::grabbedKeyboardEvent (QKeyEvent *e)
 
virtual bool KWin::Effect::isActive () const
 
virtual QString KWin::Effect::debug (const QString &parameter) const
 
virtual int KWin::Effect::requestedEffectChainPosition () const
 
virtual bool KWin::Effect::touchDown (qint32 id, const QPointF &pos, std::chrono::microseconds time)
 
virtual bool KWin::Effect::touchMotion (qint32 id, const QPointF &pos, std::chrono::microseconds time)
 
virtual bool KWin::Effect::touchUp (qint32 id, std::chrono::microseconds time)
 
virtual bool KWin::Effect::tabletToolEvent (QTabletEvent *event)
 
virtual bool KWin::Effect::tabletToolButtonEvent (uint button, bool pressed, quint64 tabletToolId)
 
virtual bool KWin::Effect::tabletPadButtonEvent (uint button, bool pressed, void *tabletPadId)
 
virtual bool KWin::Effect::tabletPadStripEvent (int number, int position, bool isFinger, void *tabletPadId)
 
virtual bool KWin::Effect::tabletPadRingEvent (int number, int position, bool isFinger, void *tabletPadId)
 
static QPointF KWin::Effect::cursorPos ()
 
static double KWin::Effect::animationTime (const KConfigGroup &cfg, const QString &key, int defaultTime)
 
static double KWin::Effect::animationTime (int defaultTime)
 
template<typename T >
int KWin::Effect::animationTime (int defaultDuration)
 
static double KWin::Effect::interpolate (double x, double y, double a)
 
static void KWin::Effect::setPositionTransformations (WindowPaintData &data, QRect &region, EffectWindow *w, const QRect &r, Qt::AspectRatioMode aspect)
 
virtual bool KWin::Effect::blocksDirectScanout () const
 
 KWin::EffectPluginFactory::EffectPluginFactory ()
 
 KWin::EffectPluginFactory::~EffectPluginFactory () override
 
virtual bool KWin::EffectPluginFactory::isSupported () const
 
virtual bool KWin::EffectPluginFactory::enabledByDefault () const
 
virtual KWin::EffectKWin::EffectPluginFactory::createEffect () const =0
 

Variables

int KWin::WindowPrePaintData::mask
 
QRegion KWin::WindowPrePaintData::paint
 
QRegion KWin::WindowPrePaintData::opaque
 
int KWin::ScreenPrePaintData::mask
 
QRegion KWin::ScreenPrePaintData::paint
 
OutputKWin::ScreenPrePaintData::screen = nullptr
 

Public Slots

virtual bool KWin::Effect::borderActivated (ElectricBorder border)
 

Detailed Description

KWin effects library contains necessary classes for creating new KWin compositing effects.

Creating new effects

This example will demonstrate the basics of creating an effect. We'll use CoolEffect as the class name, cooleffect as internal name and "Cool Effect" as user-visible name of the effect.

This example doesn't demonstrate how to write the effect's code. For that, see the documentation of the Effect class.

CoolEffect class

First you need to create CoolEffect class which has to be a subclass of KWin::Effect. In that class you can reimplement various virtual methods to control how and where the windows are drawn.

KWIN_EFFECT_FACTORY macro

This library provides a specialized KPluginFactory subclass and macros to create a sub class. This subclass of KPluginFactory has to be used, otherwise KWin won't load the plugin. Use the KWIN_EFFECT_FACTORY macro to create the plugin factory. This macro will take the embedded json metadata filename as the second argument.

Buildsystem

To build the effect, you can use the kcoreaddons_add_plugin cmake macro which takes care of creating the library and installing it. The first parameter is the name of the library, this is the same as the id of the plugin. If our effect's source is in cooleffect.cpp, we'd use following:

kcoreaddons_add_plugin(cooleffect SOURCES cooleffect.cpp INSTALL_NAMESPACE "kwin/effects/plugins")

Effect's .json file for embedded metadata

The format follows the one of the

See also
KPluginMetaData class.

Example cooleffect.json file:

{
"KPlugin": {
"Authors": [
{
"Email": "my@email.here",
"Name": "My Name"
}
],
"Category": "Misc",
"Description": "The coolest effect you've ever seen",
"Icon": "preferences-system-windows-effect-cooleffect",
"Name": "Cool Effect"
}
}

Accessing windows and workspace

Effects can gain access to the properties of windows and workspace via EffectWindow and EffectsHandler classes.

There is one global EffectsHandler object which you can access using the effects pointer. For each window, there is an EffectWindow object which can be used to read window properties such as position and also to change them.

For more information about this, see the documentation of the corresponding classes.

Macro Definition Documentation

◆ EffectPluginFactory_iid

#define EffectPluginFactory_iid   "org.kde.kwin.EffectPluginFactory" KWIN_PLUGIN_VERSION_STRING

Definition at line 974 of file effect.h.

◆ KWIN_EFFECT_API_MAKE_VERSION

#define KWIN_EFFECT_API_MAKE_VERSION ( major,
minor )   ((major) << 8 | (minor))

Definition at line 100 of file effect.h.

◆ KWIN_EFFECT_API_VERSION

#define KWIN_EFFECT_API_VERSION
Value:
#define KWIN_EFFECT_API_MAKE_VERSION(major, minor)
Definition effect.h:100
#define KWIN_EFFECT_API_VERSION_MINOR
Definition effect.h:102
#define KWIN_EFFECT_API_VERSION_MAJOR
Definition effect.h:101

Definition at line 103 of file effect.h.

◆ KWIN_EFFECT_API_VERSION_MAJOR

#define KWIN_EFFECT_API_VERSION_MAJOR   0

Definition at line 101 of file effect.h.

◆ KWIN_EFFECT_API_VERSION_MINOR

#define KWIN_EFFECT_API_VERSION_MINOR   236

Definition at line 102 of file effect.h.

◆ KWIN_EFFECT_FACTORY

#define KWIN_EFFECT_FACTORY ( className,
jsonFile )    KWIN_EFFECT_FACTORY_SUPPORTED_ENABLED(className, jsonFile, return true;, return true;)

Definition at line 1023 of file effect.h.

◆ KWIN_EFFECT_FACTORY_ENABLED

#define KWIN_EFFECT_FACTORY_ENABLED ( className,
jsonFile,
enabled )    KWIN_EFFECT_FACTORY_SUPPORTED_ENABLED(className, jsonFile, return true;, enabled)

Definition at line 1017 of file effect.h.

◆ KWIN_EFFECT_FACTORY_SUPPORTED

#define KWIN_EFFECT_FACTORY_SUPPORTED ( className,
jsonFile,
supported )    KWIN_EFFECT_FACTORY_SUPPORTED_ENABLED(className, jsonFile, supported, return true;)

Definition at line 1020 of file effect.h.

◆ KWIN_EFFECT_FACTORY_SUPPORTED_ENABLED

#define KWIN_EFFECT_FACTORY_SUPPORTED_ENABLED ( className,
jsonFile,
supported,
enabled )
Value:
{ \
Q_OBJECT \
Q_PLUGIN_METADATA(IID EffectPluginFactory_iid FILE jsonFile) \
Q_INTERFACES(KPluginFactory) \
public: \
{ \
} \
~KWIN_PLUGIN_FACTORY_NAME() \
{ \
} \
bool isSupported() const override \
{ \
supported \
} \
bool enabledByDefault() const override{ \
enabled} KWin::Effect *createEffect() const override \
{ \
return new className(); \
} \
};
Base class for all KWin effects.
Definition effect.h:535
virtual bool isSupported() const
Definition effect.cpp:563
#define EffectPluginFactory_iid
Definition effect.h:974
#define KWIN_PLUGIN_FACTORY_NAME
Definition effect.h:975
virtual KWin::Effect * createEffect() const =0
virtual bool enabledByDefault() const
Definition effect.cpp:558

Defines an EffectPluginFactory sub class with customized isSupported and enabledByDefault methods.

If the Effect to be created does not need the isSupported or enabledByDefault methods prefer the simplified KWIN_EFFECT_FACTORY, KWIN_EFFECT_FACTORY_SUPPORTED or KWIN_EFFECT_FACTORY_ENABLED macros which create an EffectPluginFactory with a useable default value.

This API is not providing binary compatibility and thus the effect plugin must be compiled against the same kwineffects library version as KWin.

Parameters
factoryNameThe name to be used for the EffectPluginFactory
classNameThe class name of the Effect sub class which is to be created by the factory
jsonFileName of the json file to be compiled into the plugin as metadata
supportedSource code to go into the isSupported() method, must return a boolean
enabledSource code to go into the enabledByDefault() method, must return a boolean

Definition at line 993 of file effect.h.

◆ KWIN_PLUGIN_FACTORY_NAME

#define KWIN_PLUGIN_FACTORY_NAME   KPLUGINFACTORY_PLUGIN_CLASS_INTERNAL_NAME

Definition at line 975 of file effect.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Flags controlling how painting is done.

Enumerator
PAINT_WINDOW_OPAQUE 

Window (or at least part of it) will be painted opaque.

PAINT_WINDOW_TRANSLUCENT 

Window (or at least part of it) will be painted translucent.

PAINT_WINDOW_TRANSFORMED 

Window will be painted with transformed geometry.

PAINT_SCREEN_REGION 

Paint only a region of the screen (can be optimized, cannot be used together with TRANSFORMED flags).

PAINT_SCREEN_TRANSFORMED 

The whole screen will be painted with transformed geometry. Forces the entire screen to be painted.

PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS 

At least one window will be painted with transformed geometry. Forces the entire screen to be painted.

PAINT_SCREEN_BACKGROUND_FIRST 

Clear whole background as the very first step, without optimizing it

Definition at line 540 of file effect.h.

◆ Feature

Enumerator
Nothing 
ScreenInversion 
Blur 
Contrast 
HighlightWindows 

Definition at line 574 of file effect.h.

◆ ReconfigureFlag

Flags describing which parts of configuration have changed.

Enumerator
ReconfigureAll 

Definition at line 600 of file effect.h.

Function Documentation

◆ animationTime() [1/3]

double KWin::Effect::animationTime ( const KConfigGroup & cfg,
const QString & key,
int defaultTime )
static

Read animation time from the configuration and possibly adjust using animationTimeFactor(). The configuration value in the effect should also have special value 'default' (set using QSpinBox::setSpecialValueText()) with the value 0. This special value is adjusted using the global animation speed, otherwise the exact time configured is returned.

Parameters
cfgconfiguration group to read value from
keyconfiguration key to read value from
defaultTimedefault animation time in milliseconds

Definition at line 483 of file effect.cpp.

◆ animationTime() [2/3]

template<typename T >
int KWin::Effect::animationTime ( int defaultDuration)

Definition at line 930 of file effect.h.

◆ animationTime() [3/3]

double KWin::Effect::animationTime ( int defaultTime)
static

Definition at line 489 of file effect.cpp.

◆ blocksDirectScanout()

bool KWin::Effect::blocksDirectScanout ( ) const
virtual

overwrite this method to return false if your effect does not need to be drawn over opaque fullscreen windows

Reimplemented in KWin::ContrastEffect, and KWin::BlurEffect.

Definition at line 545 of file effect.cpp.

◆ brightness()

qreal KWin::WindowPaintData::brightness ( ) const

Brightness of the window, in range [0; 1] 1 means that the window is unchanged, 0 means that it's completely black. 0.5 would make it 50% darker than usual

Definition at line 269 of file effect.cpp.

◆ createEffect()

virtual KWin::Effect * KWin::EffectPluginFactory::createEffect ( ) const
pure virtual

This method returns the created Effect.

◆ crossFadeProgress()

qreal KWin::WindowPaintData::crossFadeProgress ( ) const
See also
setCrossFadeProgress

Definition at line 299 of file effect.cpp.

◆ cursorPos()

QPointF KWin::Effect::cursorPos ( )
static

Definition at line 478 of file effect.cpp.

◆ debug()

QString KWin::Effect::debug ( const QString & parameter) const
virtual

Reimplement this method to provide online debugging. This could be as trivial as printing specific detail information about the effect state but could also be used to move the effect in and out of a special debug modes, clear bogus data, etc. Notice that the functions is const by intent! Whenever you alter the state of the object due to random user input, you should do so with greatest care, hence const_cast<> your object - signalling "let me alone, i know what i'm doing"

Parameters
parameterA freeform string user input for your effect to interpret.
Since
4.11

Reimplemented in KWin::AnimationEffect.

Definition at line 452 of file effect.cpp.

◆ drawWindow()

void KWin::Effect::drawWindow ( const RenderTarget & renderTarget,
const RenderViewport & viewport,
EffectWindow * w,
int mask,
const QRegion & region,
WindowPaintData & data )
virtual

Can be called to draw multiple copies (e.g. thumbnails) of a window. You can change window's opacity/brightness/etc here, but you can't do any transformations.

In OpenGL based compositing, the frameworks ensures that the context is current when this method is invoked.

Reimplemented in KWin::ContrastEffect, KWin::BlurEffect, KWin::OffscreenEffect, and KWin::CrossFadeEffect.

Definition at line 457 of file effect.cpp.

◆ Effect()

KWin::Effect::Effect ( QObject * parent = nullptr)

Constructs new Effect object.

In OpenGL based compositing, the frameworks ensures that the context is current when the Effect is constructed.

Definition at line 386 of file effect.cpp.

◆ EffectPluginFactory()

KWin::EffectPluginFactory::EffectPluginFactory ( )

Definition at line 550 of file effect.cpp.

◆ enabledByDefault()

bool KWin::EffectPluginFactory::enabledByDefault ( ) const
virtual

Returns whether the Effect should get enabled by default.

This function provides a way for an effect to override the default at runtime, e.g. based on the capabilities of the hardware.

This method is optional; the effect doesn't have to provide it.

Note that this function is only called if the supported() function returns true, and if X-KDE-PluginInfo-EnabledByDefault is set to true in the .desktop file.

This method is optional, by default true is returned.

Definition at line 558 of file effect.cpp.

◆ grabbedKeyboardEvent()

void KWin::Effect::grabbedKeyboardEvent ( QKeyEvent * e)
virtual

◆ interpolate()

static double KWin::Effect::interpolate ( double x,
double y,
double a )
inlinestatic

Linearly interpolates between x and y.

Returns x when a = 0; returns y when a = 1.

Definition at line 910 of file effect.h.

◆ isActive()

bool KWin::Effect::isActive ( ) const
virtual

Overwrite this method to indicate whether your effect will be doing something in the next frame to be rendered. If the method returns false the effect will be excluded from the chained methods in the next rendered frame.

This method is called always directly before the paint loop begins. So it is totally fine to e.g. react on a window event, issue a repaint to trigger an animation and change a flag to indicate that this method returns true.

As the method is called each frame, you should not perform complex calculations. Best use just a boolean flag.

The default implementation of this method returns true.

Since
4.8

Reimplemented in KWin::AnimationEffect, KWin::QuickSceneEffect, KWin::ContrastEffect, KWin::BlendChanges, KWin::BlurEffect, KWin::ColorBlindnessCorrectionEffect, KWin::ColorPickerEffect, KWin::DimInactiveEffect, KWin::FallApartEffect, KWin::GlideEffect, KWin::InvertEffect, KWin::KscreenEffect, KWin::MagicLampEffect, KWin::MagnifierEffect, KWin::MouseClickEffect, KWin::MouseMarkEffect, KWin::OutputLocatorEffect, KWin::ScreenEdgeEffect, KWin::ScreenShotEffect, KWin::ScreenTransformEffect, KWin::ShakeCursorEffect, KWin::SheetEffect, KWin::ShowPaintEffect, KWin::SlideEffect, KWin::SlideBackEffect, KWin::SlidingPopupsEffect, KWin::SnapHelperEffect, KWin::StartupFeedbackEffect, KWin::ThumbnailAsideEffect, KWin::TouchPointsEffect, KWin::TrackMouseEffect, KWin::WobblyWindowsEffect, and KWin::ZoomEffect.

Definition at line 447 of file effect.cpp.

◆ isSupported()

bool KWin::EffectPluginFactory::isSupported ( ) const
virtual

Returns whether the Effect is supported.

An Effect can implement this method to determine at runtime whether the Effect is supported.

If the current compositing backend is not supported it should return false.

This method is optional, by default true is returned.

Definition at line 563 of file effect.cpp.

◆ multiplyBrightness()

qreal KWin::WindowPaintData::multiplyBrightness ( qreal factor)

Multiplies the current brightness level with factor.

Parameters
factorwith which the brightness should be multiplied.
Returns
New brightness level
Since
4.10

Definition at line 321 of file effect.cpp.

◆ multiplyOpacity()

qreal KWin::WindowPaintData::multiplyOpacity ( qreal factor)

Multiplies the current opacity with the factor.

Parameters
factorFactor with which the opacity should be multiplied
Returns
New opacity level
Since
4.10

Definition at line 309 of file effect.cpp.

◆ multiplySaturation()

qreal KWin::WindowPaintData::multiplySaturation ( qreal factor)

Multiplies the current saturation with factor.

Parameters
factorwith which the saturation should be multiplied
Returns
New saturation level
Since
4.10

Definition at line 315 of file effect.cpp.

◆ opacity()

qreal KWin::WindowPaintData::opacity ( ) const

Window opacity, in range 0 = transparent to 1 = fully opaque

See also
setOpacity
Since
4.10

Definition at line 259 of file effect.cpp.

◆ operator*=() [1/3]

WindowPaintData & KWin::WindowPaintData::operator*= ( const QVector2D & scale)

Scales the window by scale factor. Performs a component wise multiplication on x and y components.

Since
4.10

Definition at line 350 of file effect.cpp.

◆ operator*=() [2/3]

WindowPaintData & KWin::WindowPaintData::operator*= ( const QVector3D & scale)

Scales the window by scale factor. Performs a component wise multiplication.

Since
4.10

Definition at line 357 of file effect.cpp.

◆ operator*=() [3/3]

WindowPaintData & KWin::WindowPaintData::operator*= ( qreal scale)

Scales the window by scale factor. Multiplies all three components by the given factor.

Since
4.10

Definition at line 342 of file effect.cpp.

◆ operator+=() [1/4]

WindowPaintData & KWin::WindowPaintData::operator+= ( const QPoint & translation)

Translates the window by the given translation and returns a reference to the ScreenPaintData. Overloaded method for convenience.

Since
4.10

Definition at line 370 of file effect.cpp.

◆ operator+=() [2/4]

WindowPaintData & KWin::WindowPaintData::operator+= ( const QPointF & translation)

Translates the window by the given translation and returns a reference to the ScreenPaintData.

Since
4.10

Definition at line 365 of file effect.cpp.

◆ operator+=() [3/4]

WindowPaintData & KWin::WindowPaintData::operator+= ( const QVector2D & translation)

Translates the window by the given translation and returns a reference to the ScreenPaintData. Overloaded method for convenience.

Since
4.10

Definition at line 375 of file effect.cpp.

◆ operator+=() [4/4]

WindowPaintData & KWin::WindowPaintData::operator+= ( const QVector3D & translation)

Translates the window by the given translation and returns a reference to the ScreenPaintData. Overloaded method for convenience.

Since
4.10

Definition at line 380 of file effect.cpp.

◆ PaintData() [1/2]

KWin::PaintData::PaintData ( )
protected

Definition at line 49 of file effect.cpp.

◆ PaintData() [2/2]

KWin::PaintData::PaintData ( const PaintData & other)
protected

◆ paintScreen()

void KWin::Effect::paintScreen ( const RenderTarget & renderTarget,
const RenderViewport & viewport,
int mask,
const QRegion & region,
Output * screen )
virtual

In this method you can:

  • paint something on top of the windows (by painting after calling effects->paintScreen())
  • paint multiple desktops and/or multiple copies of the same desktop by calling effects->paintScreen() multiple times

In OpenGL based compositing, the frameworks ensures that the context is current when this method is invoked.

Reimplemented in KWin::OutputLocatorEffect, KWin::ScreenTransformEffect, KWin::QuickSceneEffect, KWin::ColorPickerEffect, KWin::MagnifierEffect, KWin::MouseClickEffect, KWin::MouseMarkEffect, KWin::ScreenEdgeEffect, KWin::ScreenShotEffect, KWin::ShakeCursorEffect, KWin::ShowFpsEffect, KWin::ShowPaintEffect, KWin::SlideEffect, KWin::SnapHelperEffect, KWin::StartupFeedbackEffect, KWin::ThumbnailAsideEffect, KWin::TouchPointsEffect, KWin::TrackMouseEffect, and KWin::ZoomEffect.

Definition at line 417 of file effect.cpp.

◆ paintWindow()

void KWin::Effect::paintWindow ( const RenderTarget & renderTarget,
const RenderViewport & viewport,
EffectWindow * w,
int mask,
QRegion region,
WindowPaintData & data )
virtual

This is the main method for painting windows. In this method you can:

  • do various transformations
  • change opacity of the window
  • change brightness and/or saturation, if it's supported

In OpenGL based compositing, the frameworks ensures that the context is current when this method is invoked.

Reimplemented in KWin::ShowFpsEffect, KWin::AnimationEffect, KWin::BlendChanges, KWin::DimInactiveEffect, KWin::GlideEffect, KWin::KscreenEffect, KWin::SheetEffect, KWin::ShowPaintEffect, KWin::SlideEffect, KWin::SlideBackEffect, KWin::SlidingPopupsEffect, and KWin::ThumbnailAsideEffect.

Definition at line 432 of file effect.cpp.

◆ perform()

bool KWin::Effect::perform ( Feature feature,
const QVariantList & arguments )
virtual

Performs the feature with the arguments.

This allows to have specific protocols between KWin core and an Effect.

The method is supposed to return true if it performed the features, false otherwise.

The default implementation returns false.

Since
5.8

Reimplemented in KWin::HighlightWindowEffect.

Definition at line 515 of file effect.cpp.

◆ postPaintScreen()

void KWin::Effect::postPaintScreen ( )
virtual

Called after all the painting has been finished. In this method you can:

  • schedule next repaint in case of animations You shouldn't paint anything here.

In OpenGL based compositing, the frameworks ensures that the context is current when this method is invoked.

Reimplemented in KWin::AnimationEffect, KWin::BlendChanges, KWin::DimInactiveEffect, KWin::FallApartEffect, KWin::GlideEffect, KWin::KscreenEffect, KWin::MagicLampEffect, KWin::MagnifierEffect, KWin::MouseClickEffect, KWin::ShowFpsEffect, KWin::SlideEffect, KWin::SlideBackEffect, KWin::SnapHelperEffect, KWin::StartupFeedbackEffect, KWin::TouchPointsEffect, KWin::TrackMouseEffect, KWin::WobblyWindowsEffect, and KWin::ZoomEffect.

Definition at line 422 of file effect.cpp.

◆ postPaintWindow()

void KWin::Effect::postPaintWindow ( EffectWindow * w)
virtual

Called for every window after all painting has been finished. In this method you can:

  • schedule next repaint for individual window(s) in case of animations You shouldn't paint anything here.

In OpenGL based compositing, the frameworks ensures that the context is current when this method is invoked.

Reimplemented in KWin::SheetEffect, KWin::SlideBackEffect, and KWin::SlidingPopupsEffect.

Definition at line 437 of file effect.cpp.

◆ prePaintScreen()

void KWin::Effect::prePaintScreen ( ScreenPrePaintData & data,
std::chrono::milliseconds presentTime )
virtual

Called before starting to paint the screen. In this method you can:

  • set whether the windows or the entire screen will be transformed
  • change the region of the screen that will be painted
  • do various housekeeping tasks such as initing your effect's variables for the upcoming paint pass or updating animation's progress

presentTime specifies the expected monotonic time when the rendered frame will be displayed on the screen.

Reimplemented in KWin::QuickSceneEffect, KWin::BlendChanges, KWin::BlurEffect, KWin::DimInactiveEffect, KWin::FallApartEffect, KWin::GlideEffect, KWin::KscreenEffect, KWin::MagicLampEffect, KWin::MagnifierEffect, KWin::MouseClickEffect, KWin::ScreenEdgeEffect, KWin::ScreenTransformEffect, KWin::SheetEffect, KWin::ShowFpsEffect, KWin::SlideEffect, KWin::SlideBackEffect, KWin::SnapHelperEffect, KWin::StartupFeedbackEffect, KWin::TouchPointsEffect, KWin::TrackMouseEffect, KWin::WobblyWindowsEffect, and KWin::ZoomEffect.

Definition at line 412 of file effect.cpp.

◆ prePaintWindow()

void KWin::Effect::prePaintWindow ( EffectWindow * w,
WindowPrePaintData & data,
std::chrono::milliseconds presentTime )
virtual

Called for every window before the actual paint pass In this method you can:

  • enable or disable painting of the window (e.g. enable paiting of minimized window)
  • set window to be painted with translucency
  • set window to be transformed
  • request the window to be divided into multiple parts

In OpenGL based compositing, the frameworks ensures that the context is current when this method is invoked.

presentTime specifies the expected monotonic time when the rendered frame will be displayed on the screen.

Reimplemented in KWin::AnimationEffect, KWin::BlurEffect, KWin::FallApartEffect, KWin::GlideEffect, KWin::KscreenEffect, KWin::MagicLampEffect, KWin::SheetEffect, KWin::SlideEffect, KWin::SlideBackEffect, KWin::SlidingPopupsEffect, and KWin::WobblyWindowsEffect.

Definition at line 427 of file effect.cpp.

◆ projectionMatrix()

QMatrix4x4 KWin::WindowPaintData::projectionMatrix ( ) const

Returns the current projection matrix.

Definition at line 332 of file effect.cpp.

◆ provides()

bool KWin::Effect::provides ( Feature )
virtual

Called on Transparent resizes. return true if your effect substitutes questioned feature

Reimplemented in KWin::ContrastEffect, KWin::BlurEffect, KWin::HighlightWindowEffect, KWin::ColorBlindnessCorrectionEffect, and KWin::InvertEffect.

Definition at line 442 of file effect.cpp.

◆ reconfigure()

void KWin::Effect::reconfigure ( ReconfigureFlags flags)
virtual

Called when configuration changes (either the effect's or KWin's global).

In OpenGL based compositing, the frameworks ensures that the context is current when the Effect is reconfigured. If this method is called from within the Effect it is required to ensure that the context is current if the implementation does OpenGL calls.

Reimplemented in KWin::BlurEffect, KWin::ColorBlindnessCorrectionEffect, KWin::DimInactiveEffect, KWin::GlideEffect, KWin::KscreenEffect, KWin::OverviewEffect, KWin::ShakeCursorEffect, KWin::SheetEffect, KWin::SlidingPopupsEffect, KWin::SnapHelperEffect, KWin::StartupFeedbackEffect, KWin::ZoomEffect, KWin::ScriptedEffect, KWin::ScriptedQuickSceneEffect, KWin::FallApartEffect, KWin::MagicLampEffect, KWin::MagnifierEffect, KWin::MouseClickEffect, KWin::MouseMarkEffect, KWin::SlideEffect, KWin::ThumbnailAsideEffect, KWin::TilesEditorEffect, KWin::TrackMouseEffect, KWin::WindowViewEffect, and KWin::WobblyWindowsEffect.

Definition at line 395 of file effect.cpp.

◆ requestedEffectChainPosition()

int KWin::Effect::requestedEffectChainPosition ( ) const
virtual

Reimplement this method to indicate where in the Effect chain the Effect should be placed.

A low number indicates early chain position, thus before other Effects got called, a high number indicates a late position. The returned number should be in the interval [0, 100]. The default value is 0.

In KWin4 this information was provided in the Effect's desktop file as property X-KDE-Ordering. In the case of Scripted Effects this property is still used.

Since
5.0

Reimplemented in KWin::ContrastEffect, KWin::BlendChanges, KWin::BlurEffect, KWin::ColorBlindnessCorrectionEffect, KWin::ColorPickerEffect, KWin::DimInactiveEffect, KWin::FallApartEffect, KWin::GlideEffect, KWin::HighlightWindowEffect, KWin::InvertEffect, KWin::KscreenEffect, KWin::MagicLampEffect, KWin::MouseMarkEffect, KWin::OverviewEffect, KWin::ScreenEdgeEffect, KWin::ScreenShotEffect, KWin::ScreenTransformEffect, KWin::SheetEffect, KWin::SlideEffect, KWin::SlideBackEffect, KWin::SlidingPopupsEffect, KWin::StartupFeedbackEffect, KWin::TilesEditorEffect, KWin::WindowViewEffect, KWin::WobblyWindowsEffect, KWin::ZoomEffect, KWin::ScriptedEffect, and KWin::ScriptedQuickSceneEffect.

Definition at line 495 of file effect.cpp.

◆ rotationAngle()

qreal KWin::PaintData::rotationAngle ( ) const

Returns the rotation angle. Initially 0.0.

Returns
The current rotation angle.
Since
4.10
See also
setRotationAngle

Definition at line 146 of file effect.cpp.

◆ rotationAxis()

QVector3D KWin::PaintData::rotationAxis ( ) const

The current rotation axis. By default the rotation is (0/0/1) which means a rotation around the z axis.

Returns
The current rotation axis.
Since
4.10
See also
setRotationAxis

Definition at line 151 of file effect.cpp.

◆ rotationOrigin()

QVector3D KWin::PaintData::rotationOrigin ( ) const

Returns the rotation origin. That is the point in space which is fixed during the rotation. Initially this is 0/0/0.

Returns
The rotation's origin
Since
4.10
See also
setRotationOrigin()

Definition at line 156 of file effect.cpp.

◆ rprojectionMatrix()

QMatrix4x4 & KWin::WindowPaintData::rprojectionMatrix ( )

Returns a reference to the projection matrix.

Definition at line 337 of file effect.cpp.

◆ saturation()

qreal KWin::WindowPaintData::saturation ( ) const

Saturation of the window, in range [0; 1] 1 means that the window is unchanged, 0 means that it's completely unsaturated (greyscale). 0.5 would make the colors less intense, but not completely grey Use EffectsHandler::saturationSupported() to find out whether saturation is supported by the system, otherwise this value has no effect.

Returns
The current saturation
See also
setSaturation()
Since
4.10

Definition at line 264 of file effect.cpp.

◆ scale()

const QVector3D & KWin::PaintData::scale ( ) const

Definition at line 96 of file effect.cpp.

◆ screen()

int KWin::WindowPaintData::screen ( ) const

The screen number for which the painting should be done. This affects color correction (different screens may need different color correction lookup tables because they have different ICC profiles).

Returns
screen for which painting should be done

Definition at line 274 of file effect.cpp.

◆ setBrightness()

void KWin::WindowPaintData::setBrightness ( qreal brightness)

Sets the window brightness level to brightness. If you want to modify the existing brightness level consider using multiplyBrightness.

Parameters
brightnessThe new brightness level

Definition at line 289 of file effect.cpp.

◆ setCrossFadeProgress()

void KWin::WindowPaintData::setCrossFadeProgress ( qreal factor)

Sets the cross fading factor to fade over with previously sized window. If 1.0 only the current window is used, if 0.0 only the previous window is used.

By default only the current window is used. This factor can only make any visual difference if the previous window get referenced.

Parameters
factorThe cross fade factor between 0.0 (previous window) and 1.0 (current window)
See also
crossFadeProgress

Definition at line 304 of file effect.cpp.

◆ setOpacity()

void KWin::WindowPaintData::setOpacity ( qreal opacity)

Sets the window opacity to the new opacity. If you want to modify the existing opacity level consider using multiplyOpacity.

Parameters
opacityThe new opacity level
Since
4.10

Definition at line 279 of file effect.cpp.

◆ setPositionTransformations()

void KWin::Effect::setPositionTransformations ( WindowPaintData & data,
QRect & region,
EffectWindow * w,
const QRect & r,
Qt::AspectRatioMode aspect )
static

Helper to set WindowPaintData and QRegion to necessary transformations so that a following drawWindow() would put the window at the requested geometry (useful for thumbnails)

Definition at line 462 of file effect.cpp.

◆ setProjectionMatrix()

void KWin::WindowPaintData::setProjectionMatrix ( const QMatrix4x4 & matrix)

Sets the projection matrix that will be used when painting the window.

The default projection matrix can be overridden by setting this matrix

Definition at line 327 of file effect.cpp.

◆ setRotationAngle()

void KWin::PaintData::setRotationAngle ( qreal angle)

Sets the rotation angle.

Parameters
angleThe new rotation angle.
Since
4.10
See also
rotationAngle()

Definition at line 161 of file effect.cpp.

◆ setRotationAxis() [1/2]

void KWin::PaintData::setRotationAxis ( const QVector3D & axis)

Sets the rotation axis. Set a component to 1.0 to rotate around this axis and to 0.0 to disable rotation around the axis.

Parameters
axisA vector holding information on which axis to rotate
Since
4.10
See also
rotationAxis()

Definition at line 181 of file effect.cpp.

◆ setRotationAxis() [2/2]

void KWin::PaintData::setRotationAxis ( Qt::Axis axis)

Sets the rotation axis. Overloaded method for convenience.

Parameters
axisThe axis around which should be rotated.
Since
4.10
See also
rotationAxis()

Definition at line 166 of file effect.cpp.

◆ setRotationOrigin()

void KWin::PaintData::setRotationOrigin ( const QVector3D & origin)

Sets the rotation origin.

Parameters
originThe new rotation origin.
Since
4.10
See also
rotationOrigin()

Definition at line 186 of file effect.cpp.

◆ setSaturation()

void KWin::WindowPaintData::setSaturation ( qreal saturation) const

Sets the window saturation level to saturation. If you want to modify the existing saturation level consider using multiplySaturation.

Parameters
saturationThe new saturation level
Since
4.10

Definition at line 284 of file effect.cpp.

◆ setScale() [1/2]

void KWin::PaintData::setScale ( const QVector2D & scale)

Sets the scale factor in X and Y direction.

Parameters
scaleThe scale factor for X and Y direction
Since
4.10

Definition at line 71 of file effect.cpp.

◆ setScale() [2/2]

void KWin::PaintData::setScale ( const QVector3D & scale)

Sets the scale factor in X, Y and Z direction

Parameters
scaleThe scale factor for X, Y and Z direction
Since
4.10

Definition at line 77 of file effect.cpp.

◆ setScreen()

void KWin::WindowPaintData::setScreen ( int screen) const
Parameters
screenNew screen number A value less than 0 will indicate that a default profile should be done.

Definition at line 294 of file effect.cpp.

◆ setTransformed()

void KWin::WindowPrePaintData::setTransformed ( )

Helper to mark that this window will be transformed

Definition at line 27 of file effect.cpp.

◆ setTranslucent()

void KWin::WindowPrePaintData::setTranslucent ( )

Simple helper that sets data to say the window will be painted as non-opaque. Takes also care of changing the regions.

Definition at line 20 of file effect.cpp.

◆ setXScale()

void KWin::PaintData::setXScale ( qreal scale)

Sets the scale factor in X direction to scale

Parameters
scaleThe scale factor in X direction
Since
4.10

Definition at line 81 of file effect.cpp.

◆ setXTranslation()

void KWin::PaintData::setXTranslation ( qreal translate)

Sets the translation in X direction to translate.

Since
4.10

Definition at line 101 of file effect.cpp.

◆ setYScale()

void KWin::PaintData::setYScale ( qreal scale)

Sets the scale factor in Y direction to scale

Parameters
scaleThe scale factor in Y direction
Since
4.10

Definition at line 86 of file effect.cpp.

◆ setYTranslation()

void KWin::PaintData::setYTranslation ( qreal translate)

Sets the translation in Y direction to translate.

Since
4.10

Definition at line 106 of file effect.cpp.

◆ setZScale()

void KWin::PaintData::setZScale ( qreal scale)

Sets the scale factor in Z direction to scale

Parameters
scaleThe scale factor in Z direction
Since
4.10

Definition at line 91 of file effect.cpp.

◆ setZTranslation()

void KWin::PaintData::setZTranslation ( qreal translate)

Sets the translation in Z direction to translate.

Since
4.10

Definition at line 111 of file effect.cpp.

◆ tabletPadButtonEvent()

bool KWin::Effect::tabletPadButtonEvent ( uint button,
bool pressed,
void * tabletPadId )
virtual

There has been an event from a button on a drawing tablet pad

Parameters
buttonwhich button
pressedtrue if pressed, false when released
tabletPadIdthe identifier of the tool id
Since
5.25

Definition at line 530 of file effect.cpp.

◆ tabletPadRingEvent()

bool KWin::Effect::tabletPadRingEvent ( int number,
int position,
bool isFinger,
void * tabletPadId )
virtual

There has been an event from a input ring on a drawing tablet pad

Parameters
numberwhich ring
positionthe value within the ring that was selected
isFingerif it was activated with a finger
tabletPadIdthe identifier of the tool id
Since
5.25

Definition at line 540 of file effect.cpp.

◆ tabletPadStripEvent()

bool KWin::Effect::tabletPadStripEvent ( int number,
int position,
bool isFinger,
void * tabletPadId )
virtual

There has been an event from a input strip on a drawing tablet pad

Parameters
numberwhich strip
positionthe value within the strip that was selected
isFingerif it was activated with a finger
tabletPadIdthe identifier of the tool id
Since
5.25

Definition at line 535 of file effect.cpp.

◆ tabletToolButtonEvent()

bool KWin::Effect::tabletToolButtonEvent ( uint button,
bool pressed,
quint64 tabletToolId )
virtual

There has been an event from a button on a drawing tablet tool

Parameters
buttonwhich button
pressedtrue if pressed, false when released
tabletToolIdthe identifier of the tool id
Since
5.25

Definition at line 525 of file effect.cpp.

◆ tabletToolEvent()

bool KWin::Effect::tabletToolEvent ( QTabletEvent * event)
virtual

There has been an event from a drawing tablet tool

i.e. a pen and the likes.

Parameters
eventthe event information
See also
QTabletEvent
Since
5.25

Reimplemented in KWin::MouseClickEffect.

Definition at line 520 of file effect.cpp.

◆ toMatrix()

QMatrix4x4 KWin::PaintData::toMatrix ( qreal deviceScale) const

Returns the corresponding transform matrix.

The transform matrix is converted to device coordinates using the supplied deviceScale.

Definition at line 191 of file effect.cpp.

◆ touchDown()

bool KWin::Effect::touchDown ( qint32 id,
const QPointF & pos,
std::chrono::microseconds time )
virtual

A touch point was pressed.

If the effect wants to exclusively use the touch event it should return true. If false is returned the touch event is passed to further effects.

In general an Effect should only return true if it is the exclusive effect getting input events. E.g. has grabbed mouse events.

Default implementation returns false.

Parameters
idThe unique id of the touch point
posThe position of the touch point in global coordinates
timeTimestamp
See also
touchMotion
touchUp
Since
5.8

Reimplemented in KWin::QuickSceneEffect, and KWin::TouchPointsEffect.

Definition at line 500 of file effect.cpp.

◆ touchMotion()

bool KWin::Effect::touchMotion ( qint32 id,
const QPointF & pos,
std::chrono::microseconds time )
virtual

A touch point moved.

If the effect wants to exclusively use the touch event it should return true. If false is returned the touch event is passed to further effects.

In general an Effect should only return true if it is the exclusive effect getting input events. E.g. has grabbed mouse events.

Default implementation returns false.

Parameters
idThe unique id of the touch point
posThe position of the touch point in global coordinates
timeTimestamp
See also
touchDown
touchUp
Since
5.8

Reimplemented in KWin::QuickSceneEffect, and KWin::TouchPointsEffect.

Definition at line 505 of file effect.cpp.

◆ touchUp()

bool KWin::Effect::touchUp ( qint32 id,
std::chrono::microseconds time )
virtual

A touch point was released.

If the effect wants to exclusively use the touch event it should return true. If false is returned the touch event is passed to further effects.

In general an Effect should only return true if it is the exclusive effect getting input events. E.g. has grabbed mouse events.

Default implementation returns false.

Parameters
idThe unique id of the touch point
timeTimestamp
See also
touchDown
touchMotion
Since
5.8

Reimplemented in KWin::QuickSceneEffect, and KWin::TouchPointsEffect.

Definition at line 510 of file effect.cpp.

◆ translate() [1/2]

void KWin::PaintData::translate ( const QVector3D & translate)

Performs a translation by adding the values component wise. Overloaded method for convenience.

Parameters
translateThe translation
Since
4.10

Definition at line 121 of file effect.cpp.

◆ translate() [2/2]

void KWin::PaintData::translate ( qreal x,
qreal y = 0.0,
qreal z = 0.0 )

Performs a translation by adding the values component wise.

Parameters
xTranslation in X direction
yTranslation in Y direction
zTranslation in Z direction
Since
4.10

Definition at line 116 of file effect.cpp.

◆ translation()

const QVector3D & KWin::PaintData::translation ( ) const

Definition at line 141 of file effect.cpp.

◆ windowInputMouseEvent()

void KWin::Effect::windowInputMouseEvent ( QEvent * e)
virtual

Reimplemented in KWin::HelperEffect, and KWin::QuickSceneEffect.

Definition at line 399 of file effect.cpp.

◆ WindowPaintData() [1/3]

KWin::WindowPaintData::WindowPaintData ( )

Definition at line 221 of file effect.cpp.

◆ WindowPaintData() [2/3]

KWin::WindowPaintData::WindowPaintData ( const QMatrix4x4 & projectionMatrix)
explicit

Definition at line 226 of file effect.cpp.

◆ WindowPaintData() [3/3]

KWin::WindowPaintData::WindowPaintData ( const WindowPaintData & other)

Definition at line 238 of file effect.cpp.

◆ xScale()

qreal KWin::PaintData::xScale ( ) const
Returns
scale factor in X direction.
Since
4.10

Definition at line 56 of file effect.cpp.

◆ xTranslation()

qreal KWin::PaintData::xTranslation ( ) const
Returns
the translation in X direction.
Since
4.10

Definition at line 126 of file effect.cpp.

◆ yScale()

qreal KWin::PaintData::yScale ( ) const
Returns
scale factor in Y direction.
Since
4.10

Definition at line 61 of file effect.cpp.

◆ yTranslation()

qreal KWin::PaintData::yTranslation ( ) const
Returns
the translation in Y direction.
Since
4.10

Definition at line 131 of file effect.cpp.

◆ zScale()

qreal KWin::PaintData::zScale ( ) const
Returns
scale factor in Z direction.
Since
4.10

Definition at line 66 of file effect.cpp.

◆ zTranslation()

qreal KWin::PaintData::zTranslation ( ) const
Returns
the translation in Z direction.
Since
4.10

Definition at line 136 of file effect.cpp.

◆ ~Effect()

KWin::Effect::~Effect ( )
override

Destructs the Effect object.

In OpenGL based compositing, the frameworks ensures that the context is current when the Effect is destroyed.

Definition at line 391 of file effect.cpp.

◆ ~EffectPluginFactory()

KWin::EffectPluginFactory::~EffectPluginFactory ( )
override

Definition at line 554 of file effect.cpp.

◆ ~PaintData()

KWin::PaintData::~PaintData ( )
virtualdefault

◆ ~WindowPaintData()

KWin::WindowPaintData::~WindowPaintData ( )
overridedefault

Variable Documentation

◆ mask [1/2]

int KWin::WindowPrePaintData::mask

Definition at line 278 of file effect.h.

◆ mask [2/2]

int KWin::ScreenPrePaintData::mask

Definition at line 464 of file effect.h.

◆ opaque

QRegion KWin::WindowPrePaintData::opaque

Region indicating the opaque content. It can be used to avoid painting windows occluded by the opaque region.

Definition at line 287 of file effect.h.

◆ paint [1/2]

QRegion KWin::WindowPrePaintData::paint

Region that will be painted, in screen coordinates.

Definition at line 282 of file effect.h.

◆ paint [2/2]

QRegion KWin::ScreenPrePaintData::paint

Definition at line 465 of file effect.h.

◆ screen

Output* KWin::ScreenPrePaintData::screen = nullptr

Definition at line 466 of file effect.h.

Public Slots

◆ borderActivated

bool KWin::Effect::borderActivated ( ElectricBorder border)
virtualslot

Reimplemented in KWin::OverviewEffect, and KWin::WindowViewEffect.

Definition at line 407 of file effect.cpp.