summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2011-07-17 04:25:38 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-07-17 04:25:38 +0800
commitec1401a45765b95980b93788bec3b0d88769c419 (patch)
tree58cd7625e7e12186927b6857ca619bc07eaf456d
parent6494f382b89ef77c370930c05a0cbf9431f8fd57 (diff)
downloadlocker-ec1401a45765b95980b93788bec3b0d88769c419.tar.gz
locker-ec1401a45765b95980b93788bec3b0d88769c419.tar.bz2
Remove backup file
-rw-r--r--src/locker.h~278
1 files changed, 0 insertions, 278 deletions
diff --git a/src/locker.h~ b/src/locker.h~
deleted file mode 100644
index 2be02fa..0000000
--- a/src/locker.h~
+++ /dev/null
@@ -1,278 +0,0 @@
-/* Compiz locker plugin
- * Copyright (c) Canonical Ltd
- * GPLv3
- */
-
-#include <core/core.h>
-#include <composite/composite.h>
-#include <opengl/opengl.h>
-
-#include "locker_options.h"
-
-#include <X11/extensions/scrnsaver.h>
-
-class LockerLockWindow :
- public CompRect
-{
-public:
-
- LockerLockWindow () {}
- virtual ~LockerLockWindow () {};
-
- virtual void hide () = 0;
- virtual void show () = 0;
- virtual bool visible () = 0;
- virtual void paint (const GLMatrix &transform) = 0;
- virtual bool needsGrab () = 0;
- virtual bool handleKeyPress (XKeyEvent *xk) { return false; };
- virtual bool handleButtonPress (XButtonEvent *xb) { return false; };
- virtual bool handleKeyRelease (XKeyEvent *xk) { return false; };
- virtual bool handleButtonRelease (XButtonEvent *xb) { return false; };
- virtual bool handleMotion (XMotionEvent *xm) { return false; };
-
- virtual CompRegion & damage () = 0;
-
- static void
- SetDefault (LockerLockWindow *);
-
- static LockerLockWindow *
- Default ();
-};
-
-class SimpleLockerWindow :
- public LockerLockWindow
-{
-public:
- void hide ();
- void show ();
- bool visible ();
- void paint (const GLMatrix &transform);
- bool needsGrab () { return true; }
-
- bool handleKeyPress (XKeyEvent *xk);
- bool handleKeyRelease (XKeyEvent *xk);
- bool handleButtonPress (XButtonEvent *xb);
- bool handleButtonRelease (XButtonEvent *xb);
- bool handleMotion (XMotionEvent *xm);
-
- CompRegion & damage ();
-
-private:
- bool mShowing;
- CompRegion mDamage;
-};
-
-class LockerLockBackground :
- public CompRect
-{
-public:
-
- LockerLockBackground () {}
- virtual ~LockerLockBackground () {};
-
- virtual void hide () = 0;
- virtual void show () = 0;
- virtual bool visible () = 0;
- virtual void paint (const GLMatrix &transform) = 0;
- virtual CompRegion & damage () = 0;
-
- static void
- SetDefault (LockerLockBackground *);
-
- static LockerLockBackground *
- Default ();
-};
-
-class SimpleLockerBackground :
- public LockerLockBackground
-{
-public:
- void hide ();
- void show ();
- bool visible ();
- void paint (const GLMatrix &transform);
-
- CompRegion & damage ();
-
-private:
- bool mShowing;
- CompRegion mDamage;
-};
-
-class LockTrigger
-{
-public:
- LockTrigger () {}
- virtual ~LockTrigger () {}
-
- virtual void unlocked () = 0;
-
- static LockTrigger *
- Default ();
-
- static void
- SetDefault (LockTrigger *);
-};
-
-class XScreenSaverTrigger :
- public LockTrigger
-{
-public:
-
- XScreenSaverTrigger (Display *, Window root, unsigned int timeout);
- ~XScreenSaverTrigger ();
-
- bool usable ();
- void processEvent (XEvent *);
- void unlocked ();
-
-private:
-
- Display *dpy;
- Window root;
-
- int timeout;
- int interval;
- int preferBlanking;
- int allowExposures;
-
- int eventBase;
- int eventBit;
-};
-
-/* Not exactly reliable */
-class TimerTrigger :
- public LockTrigger
-{
-public:
-
- TimerTrigger (unsigned int timeout);
-
- void processEvent (XEvent *);
- bool check ();
- void unlocked ();
-
-private:
-
- CompTimer mTimer;
- unsigned int mTimeout;
- bool mLocked;
-};
-
-class Lockable
-{
-public:
-
- Lockable () {}
- virtual ~Lockable () {}
-
- virtual bool lock () = 0;
- virtual bool unlock () = 0;
- virtual bool wake () = 0;
-
- static void
- SetDefault (Lockable *);
-
- static Lockable *
- Default ();
-
-protected:
-
- LockerLockWindow *mLockerWindow;
- LockerLockBackground *mLockerBackground;
- LockTrigger *mTrigger;
-};
-
-
-
-class LockerScreen :
- public PluginClassHandler <LockerScreen, CompScreen>,
- public ScreenInterface,
- public CompositeScreenInterface,
- public GLScreenInterface,
- public Lockable,
- public LockerOptions
-{
-public:
-
- LockerScreen (CompScreen *);
- ~LockerScreen ();
-
- CompositeScreen *cScreen;
- GLScreen *gScreen;
-
- typedef enum
- {
- AnimationStateIdle = 0,
- AnimationStateLocking = 1,
- AnimationStateUnlocking = 2,
- AnimationStateLocked = 3
- } AnimationState;
-
-public:
-
- void preparePaint (int);
- bool glPaintOutput (const GLScreenPaintAttrib &attrib,
- const GLMatrix &transform,
- const CompRegion &region,
- CompOutput *output,
- unsigned int mask);
- void donePaint ();
-
- bool lock ();
- bool unlock ();
- bool wake ();
-
- void handleEvent (XEvent *);
-
-private:
-
- /* Normalized */
- float mAnimationProgress;
- CompWindowList mAnimatedWindows;
- AnimationState mAnimationState;
-
- CompTimer mWaitTimer;
-
- CompScreen::GrabHandle mGrabIndex;
-};
-
-class LockerWindow :
- public PluginClassHandler <LockerWindow, CompWindow>,
- public WindowInterface,
- public CompositeWindowInterface,
- public GLWindowInterface
-{
-public:
-
- LockerWindow (CompWindow *);
-
- CompWindow *window;
- CompositeWindow *cWindow;
- GLWindow *gWindow;
-
-public:
-
- bool glPaint (const GLWindowPaintAttrib &attrib,
- const GLMatrix &transform,
- const CompRegion &region,
- unsigned int mask);
-
- bool isLockerWindow ();
- bool isAnimatedWindow ();
-
- void setAnimationProgress (float animProgress) { mAnimationProgress = animProgress; };
-
-private:
-
- /* Normalized */
- float mAnimationProgress;
-};
-
-class LockerPluginVTable :
- public CompPlugin::VTableForScreenAndWindow <LockerScreen, LockerWindow>
-{
-public:
-
- bool init ();
-};