summaryrefslogtreecommitdiff
path: root/src/locker.h
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2011-07-17 01:39:24 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-07-17 01:39:24 +0800
commit858e8afdf35cc9037ce43a7164755560ce218b89 (patch)
treebeff2847f383d0ee3c03db0ed5f4b3e17787de41 /src/locker.h
parentf1f91f4e2bc96ddf58161ba13f0e878aa69025b1 (diff)
downloadlocker-858e8afdf35cc9037ce43a7164755560ce218b89.tar.gz
locker-858e8afdf35cc9037ce43a7164755560ce218b89.tar.bz2
Unlock the screen and beautify the code a little
Diffstat (limited to 'src/locker.h')
-rw-r--r--src/locker.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/src/locker.h b/src/locker.h
index 5a1374c..8581c33 100644
--- a/src/locker.h
+++ b/src/locker.h
@@ -98,16 +98,41 @@ private:
CompRegion mDamage;
};
+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;
+};
+
class LockerScreen :
public PluginClassHandler <LockerScreen, CompScreen>,
public ScreenInterface,
public CompositeScreenInterface,
public GLScreenInterface,
+ public Lockable,
public LockerOptions
{
public:
LockerScreen (CompScreen *);
+ ~LockerScreen ();
CompositeScreen *cScreen;
GLScreen *gScreen;
@@ -146,9 +171,6 @@ private:
CompTimer mWaitTimer;
CompScreen::GrabHandle mGrabIndex;
-
- SimpleLockerWindow *mSLW;
- SimpleLockerBackground *mSLB;
};
class LockerWindow :