~3v1n0/unity/light-shortcuts

« back to all changes in this revision

Viewing changes to tests/test-gestures/unityshell_mock.h

  • Committer: Marco Trevisan (Treviño)
  • Date: 2013-04-26 12:41:09 UTC
  • Revision ID: mail@3v1n0.net-20130426124109-t3b2shjah2omiqa2
Unity: Remove all the views, but the Shortcuts

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef UNITYSHELL_MOCK_H
2
 
#define UNITYSHELL_MOCK_H
3
 
 
4
 
#include <compiz_mock/core/core.h>
5
 
#include <sigc++/sigc++.h>
6
 
#include <NuxMock.h>
7
 
 
8
 
#include "SwitcherControllerMock.h"
9
 
 
10
 
 
11
 
namespace unity
12
 
{
13
 
 
14
 
class UnityWindowMock : public CompWindowMock
15
 
{
16
 
  public:
17
 
  static UnityWindowMock *get(CompWindowMock *window)
18
 
  {
19
 
    return static_cast<UnityWindowMock*>(window);
20
 
 
21
 
  }
22
 
 
23
 
  sigc::signal<void> being_destroyed;
24
 
};
25
 
 
26
 
class UnityScreenMock : public CompScreenMock
27
 
{
28
 
  public:
29
 
  UnityScreenMock()
30
 
  {
31
 
    switcher_controller_ = std::make_shared<switcher::ControllerMock>();
32
 
    Reset();
33
 
  }
34
 
 
35
 
  void Reset()
36
 
  {
37
 
    SetUpAndShowSwitcher_count_ = 0;
38
 
    switcher_controller_->Reset();
39
 
  }
40
 
 
41
 
  virtual ~UnityScreenMock()
42
 
  {
43
 
  }
44
 
 
45
 
  static UnityScreenMock *get(CompScreenMock *screen)
46
 
  {
47
 
    return static_cast<UnityScreenMock*>(screen);
48
 
 
49
 
  }
50
 
 
51
 
  void SetUpAndShowSwitcher()
52
 
  {
53
 
    ++SetUpAndShowSwitcher_count_;
54
 
    switcher_controller_->is_visible_ = true;
55
 
  }
56
 
 
57
 
  switcher::ControllerMock::Ptr switcher_controller()
58
 
  {
59
 
    return switcher_controller_;
60
 
  }
61
 
 
62
 
  switcher::ControllerMock::Ptr switcher_controller_;
63
 
  int SetUpAndShowSwitcher_count_;
64
 
};
65
 
 
66
 
} // namespace unity
67
 
 
68
 
#endif // UNITYSHELL_MOCK_H