~brandontschaefer/unity/bump-to-new-nux-abi

« back to all changes in this revision

Viewing changes to lockscreen/LockScreenController.h

  • Committer: Andrea Azzarone
  • Date: 2013-12-28 17:34:36 UTC
  • mto: (3566.5.438 unity)
  • mto: This revision was merged to the branch mainline in revision 3703.
  • Revision ID: azzaronea@gmail.com-20131228173436-jqschonskxaj5xx3
Initial commit for the unity lockscreen. UserAuthenticator added with tests too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
 
2
/*
 
3
* Copyright (C) 2013 Canonical Ltd
 
4
*
 
5
* This program is free software: you can redistribute it and/or modify
 
6
* it under the terms of the GNU General Public License version 3 as
 
7
* published by the Free Software Foundation.
 
8
*
 
9
* This program is distributed in the hope that it will be useful,
 
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
* GNU General Public License for more details.
 
13
*
 
14
* You should have received a copy of the GNU General Public License
 
15
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
16
*
 
17
* Authored by: Andrea Azzarone <andrea.azzarone@canonical.com>
 
18
*/
 
19
 
 
20
#ifndef UNITY_LOCKSCREEN_CONTROLLER_H
 
21
#define UNITY_LOCKSCREEN_CONTROLLER_H
 
22
 
 
23
#include <memory>
 
24
#include <sigc++/trackable.h>
 
25
 
 
26
#include "LockScreenShield.h"
 
27
#include <UnityCore/SessionManager.h>
 
28
 
 
29
namespace unity
 
30
{
 
31
namespace lockscreen
 
32
{
 
33
 
 
34
class Controller : public sigc::trackable
 
35
{
 
36
public:
 
37
  Controller(session::Manager::Ptr const& manager);
 
38
 
 
39
private:
 
40
  void EnsureShields(int monitor_with_mouse, std::vector<nux::Geometry> const& monitors);
 
41
  nux::ObjectPtr<Shield> CreateShield(bool is_monitor_with_mouse);
 
42
 
 
43
  void OnUScreenChanged(int primary, std::vector<nux::Geometry> const& monitors);
 
44
  void OnLockRequested();
 
45
  void OnUnlockRequested();
 
46
 
 
47
  session::Manager::Ptr const& manager_;
 
48
  std::vector<nux::ObjectPtr<Shield>> shields_;
 
49
  bool locked_;
 
50
};
 
51
 
 
52
}
 
53
}
 
54
 
 
55
#endif
 
 
b'\\ No newline at end of file'