Changeset View
Changeset View
Standalone View
Standalone View
effects/invert/invert.h
Show All 35 Lines | 35 | class InvertEffect | |||
---|---|---|---|---|---|
36 | : public Effect | 36 | : public Effect | ||
37 | { | 37 | { | ||
38 | Q_OBJECT | 38 | Q_OBJECT | ||
39 | public: | 39 | public: | ||
40 | InvertEffect(); | 40 | InvertEffect(); | ||
41 | ~InvertEffect(); | 41 | ~InvertEffect(); | ||
42 | 42 | | |||
43 | virtual void drawWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data); | 43 | virtual void drawWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data); | ||
44 | virtual void prePaintScreen(ScreenPrePaintData &data, int time); | | |||
45 | virtual void prePaintWindow(EffectWindow *w, WindowPrePaintData &data, int time); | | |||
46 | virtual void paintEffectFrame(KWin::EffectFrame* frame, QRegion region, double opacity, double frameOpacity); | 44 | virtual void paintEffectFrame(KWin::EffectFrame* frame, QRegion region, double opacity, double frameOpacity); | ||
47 | virtual bool isActive() const; | 45 | virtual bool isActive() const; | ||
48 | virtual bool provides(Feature); | 46 | virtual bool provides(Feature); | ||
49 | 47 | | |||
48 | int requestedEffectChainPosition() const override; | ||||
49 | | ||||
50 | static bool supported(); | 50 | static bool supported(); | ||
51 | 51 | | |||
52 | public Q_SLOTS: | 52 | public Q_SLOTS: | ||
53 | void toggleScreenInversion(); | 53 | void toggleScreenInversion(); | ||
54 | void toggleWindow(); | 54 | void toggleWindow(); | ||
55 | void slotWindowClosed(KWin::EffectWindow *w); | 55 | void slotWindowClosed(KWin::EffectWindow *w); | ||
56 | 56 | | |||
57 | protected: | 57 | protected: | ||
58 | bool loadData(); | 58 | bool loadData(); | ||
59 | 59 | | |||
60 | private: | 60 | private: | ||
61 | bool m_inited; | 61 | bool m_inited; | ||
62 | bool m_valid; | 62 | bool m_valid; | ||
63 | GLShader* m_shader; | 63 | GLShader* m_shader; | ||
64 | bool m_allWindows; | 64 | bool m_allWindows; | ||
65 | QList<EffectWindow*> m_windows; | 65 | QList<EffectWindow*> m_windows; | ||
66 | }; | 66 | }; | ||
67 | 67 | | |||
68 | inline int InvertEffect::requestedEffectChainPosition() const | ||||
69 | { | ||||
70 | return 99; | ||||
71 | } | ||||
72 | | ||||
68 | } // namespace | 73 | } // namespace | ||
69 | 74 | | |||
70 | #endif | 75 | #endif |