~alan-griffiths/miral/fix-1645284

« back to all changes in this revision

Viewing changes to miral-qt/tests/framework/mock_shell.h

  • Committer: Alan Griffiths
  • Date: 2016-11-07 17:59:19 UTC
  • mfrom: (436.1.1 miral2)
  • Revision ID: alan@octopull.co.uk-20161107175919-stbb64i7j1htgog2
[miral-qt] delete all as qtmir work on MirAL has shifted to lp:~unity-team/qtmir/miral-qt-integration and this is a needless distration

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2016 Canonical, Ltd.
3
 
 *
4
 
 * This program is free software: you can redistribute it and/or modify it under
5
 
 * the terms of the GNU Lesser General Public License version 3, as published by
6
 
 * the Free Software Foundation.
7
 
 *
8
 
 * This program is distributed in the hope that it will be useful, but WITHOUT
9
 
 * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10
 
 * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11
 
 * Lesser General Public License for more details.
12
 
 *
13
 
 * You should have received a copy of the GNU Lesser General Public License
14
 
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
 
 */
16
 
 
17
 
#ifndef MOCK_MIR_SHELL_SHELL_H
18
 
#define MOCK_MIR_SHELL_SHELL_H
19
 
 
20
 
#include <mir/shell/shell.h>
21
 
 
22
 
#include <mir/scene/prompt_session_creation_parameters.h>
23
 
#include <mir/scene/surface_creation_parameters.h>
24
 
#include <mir/shell/surface_specification.h>
25
 
 
26
 
#include <gmock/gmock.h>
27
 
 
28
 
namespace mir {
29
 
namespace shell {
30
 
 
31
 
class MockShell : public Shell
32
 
{
33
 
public:
34
 
 
35
 
    // From mir::shell::Shell
36
 
 
37
 
    MOCK_METHOD3(open_session, std::shared_ptr<scene::Session>(
38
 
        pid_t client_pid,
39
 
        std::string const& name,
40
 
        std::shared_ptr<frontend::EventSink> const& sink));
41
 
 
42
 
    MOCK_METHOD1(close_session, void(std::shared_ptr<scene::Session> const& session));
43
 
 
44
 
    MOCK_METHOD2(start_prompt_session_for, std::shared_ptr<scene::PromptSession>(
45
 
        std::shared_ptr<scene::Session> const& session,
46
 
        scene::PromptSessionCreationParameters const& params));
47
 
 
48
 
    MOCK_METHOD2(add_prompt_provider_for, void (
49
 
        std::shared_ptr<scene::PromptSession> const& prompt_session,
50
 
        std::shared_ptr<scene::Session> const& session));
51
 
 
52
 
    MOCK_METHOD1(stop_prompt_session, void (std::shared_ptr<scene::PromptSession> const& prompt_session));
53
 
 
54
 
    MOCK_METHOD3(create_surface, frontend::SurfaceId (
55
 
        std::shared_ptr<scene::Session> const& session,
56
 
        scene::SurfaceCreationParameters const& params,
57
 
        std::shared_ptr<frontend::EventSink> const& sink));
58
 
 
59
 
    MOCK_METHOD3(modify_surface, void (
60
 
        std::shared_ptr<scene::Session> const& session,
61
 
        std::shared_ptr<scene::Surface> const& surface,
62
 
        shell::SurfaceSpecification  const& modifications));
63
 
 
64
 
    MOCK_METHOD2(destroy_surface, void (std::shared_ptr<scene::Session> const& session, frontend::SurfaceId surface));
65
 
 
66
 
    MOCK_METHOD4(set_surface_attribute, int (
67
 
        std::shared_ptr<scene::Session> const& session,
68
 
        std::shared_ptr<scene::Surface> const& surface,
69
 
        MirSurfaceAttrib attrib,
70
 
        int value));
71
 
 
72
 
    MOCK_METHOD2(get_surface_attribute, int (
73
 
        std::shared_ptr<scene::Surface> const& surface,
74
 
        MirSurfaceAttrib attrib));
75
 
 
76
 
    MOCK_METHOD3(raise_surface, void (
77
 
        std::shared_ptr<scene::Session> const& session,
78
 
        std::shared_ptr<scene::Surface> const& surface,
79
 
        uint64_t timestamp));
80
 
 
81
 
    // From mir::shell::FocusController
82
 
 
83
 
    MOCK_METHOD0(focus_next_session, void ());
84
 
 
85
 
    MOCK_CONST_METHOD0(focused_session, std::shared_ptr<scene::Session>());
86
 
 
87
 
    MOCK_METHOD2(set_focus_to, void (
88
 
        std::shared_ptr<scene::Session> const& focus_session,
89
 
        std::shared_ptr<scene::Surface> const& focus_surface));
90
 
 
91
 
    MOCK_CONST_METHOD0(focused_surface, std::shared_ptr<scene::Surface>());
92
 
 
93
 
    MOCK_CONST_METHOD1(surface_at, std::shared_ptr<scene::Surface> (geometry::Point cursor));
94
 
 
95
 
    MOCK_METHOD1(raise, void (SurfaceSet const& surfaces));
96
 
 
97
 
    // From mir::input::EventFilter
98
 
 
99
 
    MOCK_METHOD1(handle, bool (MirEvent const& event));
100
 
 
101
 
    // From mir::compositor::DisplayListener
102
 
 
103
 
    MOCK_METHOD1(add_display, void (geometry::Rectangle const& area));
104
 
 
105
 
    MOCK_METHOD1(remove_display, void (geometry::Rectangle const& area));
106
 
};
107
 
 
108
 
} // namespace shell
109
 
} // namespace mir
110
 
 
111
 
#endif // MOCK_MIR_SHELL_SHELL_H