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

#include <mouseclick.h>

Inheritance diagram for KWin::MouseClickEffect:
KWin::Effect

Public Member Functions

 MouseClickEffect ()
 
 ~MouseClickEffect () override
 
void reconfigure (ReconfigureFlags) override
 
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 postPaintScreen () override
 
bool isActive () const override
 
QColor color1 () const
 
QColor color2 () const
 
QColor color3 () const
 
qreal lineWidth () const
 
int ringLife () const
 
int ringSize () const
 
int ringCount () const
 
bool isShowText () const
 
QFont font () const
 
bool isEnabled () const
 
bool tabletToolEvent (QTabletEvent *event) override
 
- Public Member Functions inherited from KWin::Effect
 Effect (QObject *parent=nullptr)
 
 ~Effect () override
 
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 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 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 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
 

Properties

QColor color1
 
QColor color2
 
QColor color3
 
qreal lineWidth
 
int ringLife
 
int ringSize
 
int ringCount
 
bool showText
 
QFont font
 
bool enabled
 

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)
 
- 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)
 

Detailed Description

Definition at line 84 of file mouseclick.h.

Constructor & Destructor Documentation

◆ MouseClickEffect()

KWin::MouseClickEffect::MouseClickEffect ( )

Definition at line 31 of file mouseclick.cpp.

◆ ~MouseClickEffect()

KWin::MouseClickEffect::~MouseClickEffect ( )
override

Definition at line 50 of file mouseclick.cpp.

Member Function Documentation

◆ color1()

QColor KWin::MouseClickEffect::color1 ( ) const

Definition at line 363 of file mouseclick.cpp.

◆ color2()

QColor KWin::MouseClickEffect::color2 ( ) const

Definition at line 368 of file mouseclick.cpp.

◆ color3()

QColor KWin::MouseClickEffect::color3 ( ) const

Definition at line 373 of file mouseclick.cpp.

◆ font()

QFont KWin::MouseClickEffect::font ( ) const

Definition at line 403 of file mouseclick.cpp.

◆ isActive()

bool KWin::MouseClickEffect::isActive ( ) const
overridevirtual

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

Definition at line 252 of file mouseclick.cpp.

◆ isEnabled()

bool KWin::MouseClickEffect::isEnabled ( ) const

Definition at line 408 of file mouseclick.cpp.

◆ isShowText()

bool KWin::MouseClickEffect::isShowText ( ) const

Definition at line 398 of file mouseclick.cpp.

◆ lineWidth()

qreal KWin::MouseClickEffect::lineWidth ( ) const

Definition at line 378 of file mouseclick.cpp.

◆ paintScreen()

void KWin::MouseClickEffect::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 101 of file mouseclick.cpp.

◆ postPaintScreen()

void KWin::MouseClickEffect::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 136 of file mouseclick.cpp.

◆ prePaintScreen()

void KWin::MouseClickEffect::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 71 of file mouseclick.cpp.

◆ reconfigure()

void KWin::MouseClickEffect::reconfigure ( ReconfigureFlags flags)
overridevirtual

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

Definition at line 57 of file mouseclick.cpp.

◆ ringCount()

int KWin::MouseClickEffect::ringCount ( ) const

Definition at line 393 of file mouseclick.cpp.

◆ ringLife()

int KWin::MouseClickEffect::ringLife ( ) const

Definition at line 383 of file mouseclick.cpp.

◆ ringSize()

int KWin::MouseClickEffect::ringSize ( ) const

Definition at line 388 of file mouseclick.cpp.

◆ tabletToolEvent()

bool KWin::MouseClickEffect::tabletToolEvent ( QTabletEvent * event)
overridevirtual

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

Definition at line 322 of file mouseclick.cpp.

Property Documentation

◆ color1

QColor KWin::MouseClickEffect::color1
read

Definition at line 88 of file mouseclick.h.

◆ color2

QColor KWin::MouseClickEffect::color2
read

Definition at line 89 of file mouseclick.h.

◆ color3

QColor KWin::MouseClickEffect::color3
read

Definition at line 90 of file mouseclick.h.

◆ enabled

bool KWin::MouseClickEffect::enabled
read

Definition at line 97 of file mouseclick.h.

◆ font

QFont KWin::MouseClickEffect::font
read

Definition at line 96 of file mouseclick.h.

◆ lineWidth

qreal KWin::MouseClickEffect::lineWidth
read

Definition at line 91 of file mouseclick.h.

◆ ringCount

int KWin::MouseClickEffect::ringCount
read

Definition at line 94 of file mouseclick.h.

◆ ringLife

int KWin::MouseClickEffect::ringLife
read

Definition at line 92 of file mouseclick.h.

◆ ringSize

int KWin::MouseClickEffect::ringSize
read

Definition at line 93 of file mouseclick.h.

◆ showText

bool KWin::MouseClickEffect::showText
read

Definition at line 95 of file mouseclick.h.


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