KWin
|
#include <touchpoints.h>
Public Member Functions | |
TouchPointsEffect () | |
~TouchPointsEffect () override | |
void | prePaintScreen (ScreenPrePaintData &data, std::chrono::milliseconds presentTime) override |
void | paintScreen (const RenderTarget &renderTarget, const RenderViewport &viewport, int mask, const QRegion ®ion, Output *screen) override |
void | postPaintScreen () override |
bool | isActive () const override |
bool | touchDown (qint32 id, const QPointF &pos, std::chrono::microseconds time) override |
bool | touchMotion (qint32 id, const QPointF &pos, std::chrono::microseconds time) override |
bool | touchUp (qint32 id, std::chrono::microseconds time) override |
qreal | lineWidth () const |
int | ringLife () const |
int | ringSize () const |
int | ringCount () const |
![]() | |
Effect (QObject *parent=nullptr) | |
~Effect () override | |
virtual void | reconfigure (ReconfigureFlags flags) |
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 ®ion, WindowPaintData &data) |
virtual void | windowInputMouseEvent (QEvent *e) |
virtual void | grabbedKeyboardEvent (QKeyEvent *e) |
virtual QString | debug (const QString ¶meter) const |
virtual int | requestedEffectChainPosition () const |
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 |
Properties | |
qreal | lineWidth |
int | ringLife |
int | ringSize |
int | ringCount |
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) |
![]() | |
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) |
Definition at line 18 of file touchpoints.h.
KWin::TouchPointsEffect::TouchPointsEffect | ( | ) |
Definition at line 29 of file touchpoints.cpp.
|
overridedefault |
|
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
.
Reimplemented from KWin::Effect.
Definition at line 179 of file touchpoints.cpp.
|
inline |
Definition at line 38 of file touchpoints.h.
|
overridevirtual |
In this method you can:
In OpenGL based compositing, the frameworks ensures that the context is current when this method is invoked.
Reimplemented from KWin::Effect.
Definition at line 123 of file touchpoints.cpp.
|
overridevirtual |
Called after all the painting has been finished. In this method you can:
In OpenGL based compositing, the frameworks ensures that the context is current when this method is invoked.
Reimplemented from KWin::Effect.
Definition at line 146 of file touchpoints.cpp.
|
overridevirtual |
Called before starting to paint the screen. In this method you can:
presentTime specifies the expected monotonic time when the rendered frame will be displayed on the screen.
Reimplemented from KWin::Effect.
Definition at line 97 of file touchpoints.cpp.
|
inline |
Definition at line 50 of file touchpoints.h.
|
inline |
Definition at line 42 of file touchpoints.h.
|
inline |
Definition at line 46 of file touchpoints.h.
|
overridevirtual |
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
.
id | The unique id of the touch point |
pos | The position of the touch point in global coordinates |
time | Timestamp |
Reimplemented from KWin::Effect.
Definition at line 60 of file touchpoints.cpp.
|
overridevirtual |
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
.
id | The unique id of the touch point |
pos | The position of the touch point in global coordinates |
time | Timestamp |
Reimplemented from KWin::Effect.
Definition at line 72 of file touchpoints.cpp.
|
overridevirtual |
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
.
id | The unique id of the touch point |
time | Timestamp |
Reimplemented from KWin::Effect.
Definition at line 84 of file touchpoints.cpp.
|
read |
Definition at line 22 of file touchpoints.h.
|
read |
Definition at line 25 of file touchpoints.h.
|
read |
Definition at line 23 of file touchpoints.h.
|
read |
Definition at line 24 of file touchpoints.h.