KWin
Loading...
Searching...
No Matches
Signals | Public Member Functions | Static Public Member Functions | Properties | List of all members
KWin::ShowFpsEffect Class Reference

#include <showfpseffect.h>

Inheritance diagram for KWin::ShowFpsEffect:
KWin::Effect

Signals

void fpsChanged ()
 
void maximumFpsChanged ()
 
void paintChanged ()
 

Public Member Functions

 ShowFpsEffect ()
 
 ~ShowFpsEffect () override
 
int fps () const
 
int maximumFps () const
 
int paintDuration () const
 
int paintAmount () const
 
QColor paintColor () const
 
void prePaintScreen (ScreenPrePaintData &data, std::chrono::milliseconds presentTime) override
 
void paintScreen (const RenderTarget &renderTarget, const RenderViewport &viewport, int mask, const QRegion &region, Output *screen) override
 
void paintWindow (const RenderTarget &renderTarget, const RenderViewport &viewport, EffectWindow *w, int mask, QRegion region, KWin::WindowPaintData &data) override
 
void postPaintScreen () override
 
- Public Member Functions inherited from KWin::Effect
 Effect (QObject *parent=nullptr)
 
 ~Effect () override
 
virtual void reconfigure (ReconfigureFlags flags)
 
virtual void prePaintWindow (EffectWindow *w, WindowPrePaintData &data, std::chrono::milliseconds presentTime)
 
virtual void postPaintWindow (EffectWindow *w)
 
virtual bool provides (Feature)
 
virtual bool perform (Feature feature, const QVariantList &arguments)
 
virtual void drawWindow (const RenderTarget &renderTarget, const RenderViewport &viewport, EffectWindow *w, int mask, const QRegion &region, WindowPaintData &data)
 
virtual void windowInputMouseEvent (QEvent *e)
 
virtual void grabbedKeyboardEvent (QKeyEvent *e)
 
virtual bool isActive () const
 
virtual QString debug (const QString &parameter) 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 Public Member Functions inherited from KWin::Effect
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 &region, EffectWindow *w, const QRect &r, Qt::AspectRatioMode aspect)
 

Properties

int fps
 
int maximumFps
 
int paintDuration
 
int paintAmount
 
QColor paintColor
 

Additional Inherited Members

- Public Types inherited from KWin::Effect
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 }
 
- Public Slots inherited from KWin::Effect
virtual bool borderActivated (ElectricBorder border)
 

Detailed Description

Definition at line 19 of file showfpseffect.h.

Constructor & Destructor Documentation

◆ ShowFpsEffect()

KWin::ShowFpsEffect::ShowFpsEffect ( )

Definition at line 19 of file showfpseffect.cpp.

◆ ~ShowFpsEffect()

KWin::ShowFpsEffect::~ShowFpsEffect ( )
overridedefault

Member Function Documentation

◆ fps()

int KWin::ShowFpsEffect::fps ( ) const

Definition at line 25 of file showfpseffect.cpp.

◆ fpsChanged

void KWin::ShowFpsEffect::fpsChanged ( )
signal

◆ maximumFps()

int KWin::ShowFpsEffect::maximumFps ( ) const

Definition at line 30 of file showfpseffect.cpp.

◆ maximumFpsChanged

void KWin::ShowFpsEffect::maximumFpsChanged ( )
signal

◆ paintAmount()

int KWin::ShowFpsEffect::paintAmount ( ) const

Definition at line 40 of file showfpseffect.cpp.

◆ paintChanged

void KWin::ShowFpsEffect::paintChanged ( )
signal

◆ paintColor()

QColor KWin::ShowFpsEffect::paintColor ( ) const

Definition at line 45 of file showfpseffect.cpp.

◆ paintDuration()

int KWin::ShowFpsEffect::paintDuration ( ) const

Definition at line 35 of file showfpseffect.cpp.

◆ paintScreen()

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

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 from KWin::Effect.

Definition at line 80 of file showfpseffect.cpp.

◆ paintWindow()

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

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 from KWin::Effect.

Definition at line 97 of file showfpseffect.cpp.

◆ postPaintScreen()

void KWin::ShowFpsEffect::postPaintScreen ( )
overridevirtual

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 from KWin::Effect.

Definition at line 110 of file showfpseffect.cpp.

◆ prePaintScreen()

void KWin::ShowFpsEffect::prePaintScreen ( ScreenPrePaintData & data,
std::chrono::milliseconds presentTime )
overridevirtual

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 from KWin::Effect.

Definition at line 51 of file showfpseffect.cpp.

◆ supported()

bool KWin::ShowFpsEffect::supported ( )
static

Definition at line 120 of file showfpseffect.cpp.

Property Documentation

◆ fps

int KWin::ShowFpsEffect::fps
read

Definition at line 22 of file showfpseffect.h.

◆ maximumFps

int KWin::ShowFpsEffect::maximumFps
read

Definition at line 23 of file showfpseffect.h.

◆ paintAmount

int KWin::ShowFpsEffect::paintAmount
read

Definition at line 25 of file showfpseffect.h.

◆ paintColor

QColor KWin::ShowFpsEffect::paintColor
read

Definition at line 26 of file showfpseffect.h.

◆ paintDuration

int KWin::ShowFpsEffect::paintDuration
read

Definition at line 24 of file showfpseffect.h.


The documentation for this class was generated from the following files: