~hikiko/unity/unity.shadows

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
/*
 * Copyright (C) 2012 Canonical Ltd
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 3 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Authored by: Sam Spilsbury <smspillaz@gmail.com>
 */
#ifndef UNITY_MOCK_WINDOW_MANAGER_H
#define UNITY_MOCK_WINDOW_MANAGER_H

#include <gmock/gmock.h>

#include <WindowManager.h>

namespace unity
{
class MockWindowManager : public WindowManager
{
  public:

    MockWindowManager();
    ~MockWindowManager();

    MOCK_CONST_METHOD0(GetActiveWindow, Window());
    MOCK_CONST_METHOD0(GetWindowsInStackingOrder, std::vector<Window>());
    MOCK_CONST_METHOD1(IsWindowDecorated, bool(Window));
    MOCK_CONST_METHOD1(IsWindowMaximized, bool(Window));
    MOCK_CONST_METHOD1(IsWindowOnCurrentDesktop, bool(Window));
    MOCK_CONST_METHOD1(IsWindowObscured, bool(Window));
    MOCK_CONST_METHOD1(IsWindowMapped, bool(Window));
    MOCK_CONST_METHOD1(IsWindowVisible, bool(Window));
    MOCK_CONST_METHOD1(IsWindowOnTop, bool(Window));
    MOCK_CONST_METHOD1(IsWindowClosable, bool(Window));
    MOCK_CONST_METHOD1(IsWindowMinimized, bool(Window));
    MOCK_CONST_METHOD1(IsWindowMinimizable, bool(Window));
    MOCK_CONST_METHOD1(IsWindowMaximizable, bool(Window));
    MOCK_CONST_METHOD1(HasWindowDecorations, bool(Window));

    MOCK_METHOD0(ShowDesktop, void());
    MOCK_CONST_METHOD0(InShowDesktop, bool());

    MOCK_METHOD1(Maximize, void(Window));
    MOCK_METHOD1(Restore, void(Window));
    MOCK_METHOD3(RestoreAt, void(Window, int, int));
    MOCK_METHOD1(Minimize, void(Window));
    MOCK_METHOD1(UnMinimize, void(Window));
    MOCK_METHOD1(Close, void(Window));
    MOCK_METHOD1(Activate, void(Window));
    MOCK_METHOD1(Raise, void(Window));
    MOCK_METHOD1(Lower, void(Window));
    MOCK_METHOD2(RestackBelow, void(Window, Window));

    MOCK_METHOD0(TerminateScale, void());
    MOCK_CONST_METHOD0(IsScaleActive, bool());
    MOCK_CONST_METHOD0(IsScaleActiveForGroup, bool());
    MOCK_METHOD0(InitiateExpo, void());
    MOCK_METHOD0(TerminateExpo, void());
    MOCK_CONST_METHOD0(IsExpoActive, bool());
    MOCK_CONST_METHOD0(IsWallActive, bool());
    MOCK_CONST_METHOD0(IsAnyWindowMoving, bool());    

    MOCK_METHOD4(FocusWindowGroup, void(std::vector<Window> const&,
                                        FocusVisibility, int,
                                        bool));
    MOCK_METHOD3(ScaleWindowGroup, bool(std::vector<Window> const&, int, bool));

    MOCK_CONST_METHOD0(IsScreenGrabbed, bool());
    MOCK_CONST_METHOD0(IsViewPortSwitchStarted, bool());

    MOCK_METHOD2(MoveResizeWindow, void(Window, nux::Geometry));
    MOCK_METHOD3(StartMove, void(Window, int, int));

    MOCK_CONST_METHOD1(GetWindowMonitor, int(Window));
    MOCK_CONST_METHOD1(GetWindowGeometry, nux::Geometry(Window));
    MOCK_CONST_METHOD1(GetWindowSavedGeometry, nux::Geometry(Window));
    MOCK_CONST_METHOD2(GetWindowDecorationSize, nux::Size(Window, WindowManager::Edge));
    MOCK_CONST_METHOD0(GetScreenGeometry, nux::Geometry());
    MOCK_CONST_METHOD1(GetWorkAreaGeometry, nux::Geometry(Window));

    MOCK_CONST_METHOD1(GetWindowActiveNumber, uint64_t(Window));

    MOCK_METHOD2(SetWindowIconGeometry, void(Window, nux::Geometry const&));

    MOCK_METHOD3(CheckWindowIntersections, void(nux::Geometry const&, bool&, bool&));

    MOCK_CONST_METHOD0(WorkspaceCount, int());

    MOCK_METHOD0(SaveInputFocus, bool());
    MOCK_METHOD0(RestoreInputFocus, bool());

    MOCK_CONST_METHOD1(GetWindowName, std::string(Window));
    MOCK_CONST_METHOD1(IsOnscreenKeyboard, bool(Window));

    MOCK_METHOD1(AddProperties, void(GVariantBuilder*));
};
}

#endif // UNITY_MOCK_WINDOW_MANAGER_H