KWin
|
#include <offscreeneffect.h>
Public Member Functions | |
OffscreenEffect (QObject *parent=nullptr) | |
~OffscreenEffect () override | |
![]() | |
Effect (QObject *parent=nullptr) | |
~Effect () override | |
virtual void | reconfigure (ReconfigureFlags flags) |
virtual void | prePaintScreen (ScreenPrePaintData &data, std::chrono::milliseconds presentTime) |
virtual void | paintScreen (const RenderTarget &renderTarget, const RenderViewport &viewport, int mask, const QRegion ®ion, Output *screen) |
virtual void | postPaintScreen () |
virtual void | prePaintWindow (EffectWindow *w, WindowPrePaintData &data, std::chrono::milliseconds presentTime) |
virtual void | paintWindow (const RenderTarget &renderTarget, const RenderViewport &viewport, EffectWindow *w, int mask, QRegion region, WindowPaintData &data) |
virtual void | postPaintWindow (EffectWindow *w) |
virtual bool | provides (Feature) |
virtual bool | perform (Feature feature, const QVariantList &arguments) |
virtual void | windowInputMouseEvent (QEvent *e) |
virtual void | grabbedKeyboardEvent (QKeyEvent *e) |
virtual bool | isActive () const |
virtual QString | debug (const QString ¶meter) const |
virtual int | requestedEffectChainPosition () const |
virtual bool | touchDown (qint32 id, const QPointF &pos, std::chrono::microseconds time) |
virtual bool | touchMotion (qint32 id, const QPointF &pos, std::chrono::microseconds time) |
virtual bool | touchUp (qint32 id, std::chrono::microseconds time) |
virtual bool | tabletToolEvent (QTabletEvent *event) |
virtual bool | tabletToolButtonEvent (uint button, bool pressed, quint64 tabletToolId) |
virtual bool | tabletPadButtonEvent (uint button, bool pressed, void *tabletPadId) |
virtual bool | tabletPadStripEvent (int number, int position, bool isFinger, void *tabletPadId) |
virtual bool | tabletPadRingEvent (int number, int position, bool isFinger, void *tabletPadId) |
template<typename T > | |
int | animationTime (int defaultDuration) |
virtual bool | blocksDirectScanout () const |
Static Public Member Functions | |
static bool | supported () |
![]() | |
static QPointF | cursorPos () |
static double | animationTime (const KConfigGroup &cfg, const QString &key, int defaultTime) |
static double | animationTime (int defaultTime) |
static double | interpolate (double x, double y, double a) |
static void | setPositionTransformations (WindowPaintData &data, QRect ®ion, EffectWindow *w, const QRect &r, Qt::AspectRatioMode aspect) |
Protected Member Functions | |
void | drawWindow (const RenderTarget &renderTarget, const RenderViewport &viewport, EffectWindow *window, int mask, const QRegion ®ion, WindowPaintData &data) override |
void | redirect (EffectWindow *window) |
void | unredirect (EffectWindow *window) |
virtual void | apply (EffectWindow *window, int mask, WindowPaintData &data, WindowQuadList &quads) |
void | setShader (EffectWindow *window, GLShader *shader) |
void | setVertexSnappingMode (RenderGeometry::VertexSnappingMode mode) |
Additional Inherited Members | |
![]() | |
enum | { PAINT_WINDOW_OPAQUE = 1 << 0 , PAINT_WINDOW_TRANSLUCENT = 1 << 1 , PAINT_WINDOW_TRANSFORMED = 1 << 2 , PAINT_SCREEN_REGION = 1 << 3 , PAINT_SCREEN_TRANSFORMED = 1 << 4 , PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS = 1 << 5 , PAINT_SCREEN_BACKGROUND_FIRST = 1 << 6 } |
enum | Feature { Nothing = 0 , ScreenInversion , Blur , Contrast , HighlightWindows } |
enum | ReconfigureFlag { ReconfigureAll = 1 << 0 } |
![]() | |
virtual bool | borderActivated (ElectricBorder border) |
The OffscreenEffect class is the base class for effects that paint deformed windows.
Under the hood, the OffscreenEffect will paint the window into an offscreen texture and the offscreen texture will be transformed afterwards.
The redirect() function must be called when the effect wants to transform a window. Once the effect is no longer interested in the window, the unredirect() function must be called.
If a window is redirected into offscreen texture, the deform() function will be called to transform the offscreen texture.
Definition at line 33 of file offscreeneffect.h.
|
explicit |
Definition at line 47 of file offscreeneffect.cpp.
|
overridedefault |
|
protectedvirtual |
Override this function to transform the window.
Reimplemented in KWin::FallApartEffect, KWin::WobblyWindowsEffect, and KWin::MagicLampEffect.
Definition at line 92 of file offscreeneffect.cpp.
|
overrideprotectedvirtual |
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 from KWin::Effect.
Definition at line 221 of file offscreeneffect.cpp.
|
protected |
This function must be called when the effect wants to animate the specified window.
Definition at line 60 of file offscreeneffect.cpp.
|
protected |
Allows to specify a shader
to draw the redirected texture for window
. Can only be called once the window is redirected.
Definition at line 85 of file offscreeneffect.cpp.
|
protected |
Set what mode to use to snap the vertices of this effect.
Definition at line 275 of file offscreeneffect.cpp.
|
static |
Definition at line 55 of file offscreeneffect.cpp.
|
protected |
This function must be called when the effect is done animating the specified window. The window will be automatically unredirected if it's deleted.
Definition at line 77 of file offscreeneffect.cpp.