EffectsHandler and Effect become QObjects
This is in preparation for allowing to connect effects with signals and slots.
This commit is contained in:
parent
3c290e07cd
commit
b3a5639967
21 changed files with 25 additions and 23 deletions
|
@ -34,7 +34,7 @@ namespace KWin
|
||||||
{
|
{
|
||||||
|
|
||||||
class CubeEffect
|
class CubeEffect
|
||||||
: public QObject, public Effect
|
: public Effect
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -31,6 +31,7 @@ namespace KWin
|
||||||
class CubeSlideEffect
|
class CubeSlideEffect
|
||||||
: public Effect
|
: public Effect
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
CubeSlideEffect();
|
CubeSlideEffect();
|
||||||
~CubeSlideEffect();
|
~CubeSlideEffect();
|
||||||
|
|
|
@ -59,7 +59,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
class DesktopGridEffect
|
class DesktopGridEffect
|
||||||
: public QObject, public Effect
|
: public Effect
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace KWin
|
||||||
{
|
{
|
||||||
|
|
||||||
class FadeDesktopEffect
|
class FadeDesktopEffect
|
||||||
: public QObject, public Effect
|
: public Effect
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace KWin
|
||||||
{
|
{
|
||||||
|
|
||||||
class FlipSwitchEffect
|
class FlipSwitchEffect
|
||||||
: public QObject, public Effect
|
: public Effect
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -33,7 +33,7 @@ class GLShader;
|
||||||
* Inverts desktop's colors
|
* Inverts desktop's colors
|
||||||
**/
|
**/
|
||||||
class InvertEffect
|
class InvertEffect
|
||||||
: public QObject, public Effect
|
: public Effect
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -43,8 +43,7 @@ KWIN_EFFECT_SUPPORTED(lookingglass, LookingGlassEffect::supported())
|
||||||
|
|
||||||
|
|
||||||
LookingGlassEffect::LookingGlassEffect()
|
LookingGlassEffect::LookingGlassEffect()
|
||||||
: QObject()
|
: zoom(1.0f)
|
||||||
, zoom(1.0f)
|
|
||||||
, target_zoom(1.0f)
|
, target_zoom(1.0f)
|
||||||
, polling(false)
|
, polling(false)
|
||||||
, m_texture(NULL)
|
, m_texture(NULL)
|
||||||
|
|
|
@ -37,7 +37,7 @@ class GLVertexBuffer;
|
||||||
/**
|
/**
|
||||||
* Enhanced magnifier
|
* Enhanced magnifier
|
||||||
**/
|
**/
|
||||||
class LookingGlassEffect : public QObject, public Effect
|
class LookingGlassEffect : public Effect
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace KWin
|
||||||
{
|
{
|
||||||
|
|
||||||
class MagnifierEffect
|
class MagnifierEffect
|
||||||
: public QObject, public Effect
|
: public Effect
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace KWin
|
||||||
{
|
{
|
||||||
|
|
||||||
class MouseMarkEffect
|
class MouseMarkEffect
|
||||||
: public QObject, public Effect
|
: public Effect
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -63,7 +63,7 @@ private:
|
||||||
* letting the user select active window.
|
* letting the user select active window.
|
||||||
**/
|
**/
|
||||||
class PresentWindowsEffect
|
class PresentWindowsEffect
|
||||||
: public QObject, public Effect
|
: public Effect
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
namespace KWin
|
namespace KWin
|
||||||
{
|
{
|
||||||
|
|
||||||
class ScreenShotEffect : public QObject, public Effect
|
class ScreenShotEffect : public Effect
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_CLASSINFO("D-Bus Interface", "org.kde.kwin.Screenshot")
|
Q_CLASSINFO("D-Bus Interface", "org.kde.kwin.Screenshot")
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace KWin
|
||||||
{
|
{
|
||||||
|
|
||||||
class SlideEffect
|
class SlideEffect
|
||||||
: public QObject, public Effect
|
: public Effect
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -30,7 +30,7 @@ namespace KWin
|
||||||
class GLTexture;
|
class GLTexture;
|
||||||
|
|
||||||
class StartupFeedbackEffect
|
class StartupFeedbackEffect
|
||||||
: public QObject, public Effect
|
: public Effect
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -36,8 +36,7 @@ namespace KWin
|
||||||
{
|
{
|
||||||
|
|
||||||
class ThumbnailAsideEffect
|
class ThumbnailAsideEffect
|
||||||
: public QObject
|
: public Effect
|
||||||
, public Effect
|
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace KWin
|
||||||
class GLTexture;
|
class GLTexture;
|
||||||
|
|
||||||
class TrackMouseEffect
|
class TrackMouseEffect
|
||||||
: public QObject, public Effect
|
: public Effect
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
namespace KWin
|
namespace KWin
|
||||||
{
|
{
|
||||||
|
|
||||||
class WindowGeometry : public QObject, public Effect
|
class WindowGeometry : public Effect
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -57,8 +57,7 @@ static int nominalCursorSize(int iconSize)
|
||||||
KWIN_EFFECT(zoom, ZoomEffect)
|
KWIN_EFFECT(zoom, ZoomEffect)
|
||||||
|
|
||||||
ZoomEffect::ZoomEffect()
|
ZoomEffect::ZoomEffect()
|
||||||
: QObject()
|
: Effect()
|
||||||
, Effect()
|
|
||||||
, zoom(1)
|
, zoom(1)
|
||||||
, target_zoom(1)
|
, target_zoom(1)
|
||||||
, polling(false)
|
, polling(false)
|
||||||
|
|
|
@ -32,7 +32,7 @@ class GLTexture;
|
||||||
class XRenderPicture;
|
class XRenderPicture;
|
||||||
|
|
||||||
class ZoomEffect
|
class ZoomEffect
|
||||||
: public QObject, public Effect
|
: public Effect
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1337,3 +1337,5 @@ void EffectFrame::enableCrossFade(bool enable)
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
#include "kwineffects.moc"
|
||||||
|
|
|
@ -263,8 +263,9 @@ QRect infiniteRegion()
|
||||||
* is called for every window which the screen method is usually called just
|
* is called for every window which the screen method is usually called just
|
||||||
* once.
|
* once.
|
||||||
**/
|
**/
|
||||||
class KWIN_EXPORT Effect
|
class KWIN_EXPORT Effect : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
/** Flags controlling how painting is done. */
|
/** Flags controlling how painting is done. */
|
||||||
// TODO: is that ok here?
|
// TODO: is that ok here?
|
||||||
|
@ -579,8 +580,9 @@ public:
|
||||||
* desktop or create a special input window to receive mouse and keyboard
|
* desktop or create a special input window to receive mouse and keyboard
|
||||||
* events.
|
* events.
|
||||||
**/
|
**/
|
||||||
class KWIN_EXPORT EffectsHandler
|
class KWIN_EXPORT EffectsHandler : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
friend class Effect;
|
friend class Effect;
|
||||||
public:
|
public:
|
||||||
EffectsHandler(CompositingType type);
|
EffectsHandler(CompositingType type);
|
||||||
|
|
Loading…
Reference in a new issue