~alan-griffiths/miral/debug

« back to all changes in this revision

Viewing changes to miral-qt/tests/mirserver/WindowManager/stub_surface.cpp

  • Committer: Gerry Boland
  • Date: 2016-06-01 22:06:51 UTC
  • mto: This revision was merged to the branch mainline in revision 178.
  • Revision ID: gerry.boland@canonical.com-20160601220651-ge508tffql4e7u7c
Import QtMir code into miral-qt subdirectory. Disabled by default, use -DMIRAL_ENABLE_QT=1 to build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright © 2015 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
#include "stub_surface.h"
 
18
#include <mir_toolkit/common.h>
 
19
//#include <mir/input/input_reception_mode.h>
 
20
 
 
21
std::string StubSurface::name() const
 
22
{
 
23
    return {};
 
24
}
 
25
 
 
26
void StubSurface::move_to(mir::geometry::Point const& /*top_left*/)
 
27
{
 
28
}
 
29
 
 
30
float StubSurface::alpha() const
 
31
{
 
32
    return 0;
 
33
}
 
34
 
 
35
mir::geometry::Size StubSurface::size() const
 
36
{
 
37
    return {};
 
38
}
 
39
 
 
40
mir::geometry::Size StubSurface::client_size() const
 
41
{
 
42
    return {};
 
43
}
 
44
 
 
45
std::shared_ptr <mir::frontend::BufferStream> StubSurface::primary_buffer_stream() const
 
46
{
 
47
    return {};
 
48
}
 
49
 
 
50
void StubSurface::set_streams(std::list<mir::scene::StreamInfo> const& /*streams*/)
 
51
{
 
52
}
 
53
 
 
54
bool StubSurface::supports_input() const
 
55
{
 
56
    return false;
 
57
}
 
58
 
 
59
int StubSurface::client_input_fd() const
 
60
{
 
61
    return 0;
 
62
}
 
63
 
 
64
std::shared_ptr <mir::input::InputChannel> StubSurface::input_channel() const
 
65
{
 
66
    return {};
 
67
}
 
68
 
 
69
mir::input::InputReceptionMode StubSurface::reception_mode() const
 
70
{
 
71
    return mir::input::InputReceptionMode::normal;
 
72
}
 
73
 
 
74
void StubSurface::set_reception_mode(mir::input::InputReceptionMode /*mode*/)
 
75
{
 
76
}
 
77
 
 
78
void StubSurface::set_input_region(std::vector<mir::geometry::Rectangle> const& /*input_rectangles*/)
 
79
{
 
80
}
 
81
 
 
82
void StubSurface::resize(mir::geometry::Size const& /*size*/)
 
83
{
 
84
}
 
85
 
 
86
mir::geometry::Point StubSurface::top_left() const
 
87
{
 
88
    return {};
 
89
}
 
90
 
 
91
mir::geometry::Rectangle StubSurface::input_bounds() const
 
92
{
 
93
    return {};
 
94
}
 
95
 
 
96
bool StubSurface::input_area_contains(mir::geometry::Point const& /*point*/) const
 
97
{
 
98
    return false;
 
99
}
 
100
 
 
101
void StubSurface::consume(MirEvent const* /*event*/)
 
102
{
 
103
}
 
104
 
 
105
void StubSurface::set_alpha(float /*alpha*/)
 
106
{
 
107
}
 
108
 
 
109
void StubSurface::set_orientation(MirOrientation /*orientation*/)
 
110
{
 
111
}
 
112
 
 
113
void StubSurface::set_transformation(glm::mat4 const& /*mat4*/)
 
114
{
 
115
}
 
116
 
 
117
bool StubSurface::visible() const
 
118
{
 
119
    return false;
 
120
}
 
121
 
 
122
mir::graphics::RenderableList StubSurface::generate_renderables(mir::compositor::CompositorID /*id*/) const
 
123
{
 
124
    return {};
 
125
}
 
126
 
 
127
int StubSurface::buffers_ready_for_compositor(void const* /*compositor_id*/) const
 
128
{
 
129
    return 0;
 
130
}
 
131
 
 
132
MirSurfaceType StubSurface::type() const
 
133
{
 
134
    return MirSurfaceType::mir_surface_type_normal;
 
135
}
 
136
 
 
137
MirSurfaceState StubSurface::state() const
 
138
{
 
139
    return MirSurfaceState::mir_surface_state_fullscreen;
 
140
}
 
141
 
 
142
int StubSurface::configure(MirSurfaceAttrib /*attrib*/, int value)
 
143
{
 
144
    return value;
 
145
}
 
146
 
 
147
int StubSurface::query(MirSurfaceAttrib /*attrib*/) const
 
148
{
 
149
    return 0;
 
150
}
 
151
 
 
152
void StubSurface::hide()
 
153
{
 
154
}
 
155
 
 
156
void StubSurface::show()
 
157
{
 
158
}
 
159
 
 
160
void StubSurface::set_cursor_image(std::shared_ptr<mir::graphics::CursorImage> const& /*image*/)
 
161
{
 
162
}
 
163
 
 
164
std::shared_ptr<mir::graphics::CursorImage> StubSurface::cursor_image() const
 
165
{
 
166
    return {};
 
167
}
 
168
 
 
169
void StubSurface::set_cursor_stream(
 
170
    std::shared_ptr<mir::frontend::BufferStream> const& /*stream*/,
 
171
    mir::geometry::Displacement const& /*hotspot*/)
 
172
{
 
173
}
 
174
 
 
175
void StubSurface::request_client_surface_close()
 
176
{
 
177
}
 
178
 
 
179
std::shared_ptr<mir::scene::Surface> StubSurface::parent() const
 
180
{
 
181
    return {};
 
182
}
 
183
 
 
184
void StubSurface::add_observer(std::shared_ptr<mir::scene::SurfaceObserver> const& /*observer*/)
 
185
{
 
186
}
 
187
 
 
188
void StubSurface::remove_observer(std::weak_ptr < mir::scene::SurfaceObserver > const& /*observer*/)
 
189
{
 
190
}
 
191
 
 
192
void StubSurface::set_keymap(MirInputDeviceId /*id*/, std::string const& /*model*/, std::string const& /*layout*/,
 
193
                             std::string const& /*variant*/, std::string const& /*options*/)
 
194
{
 
195
}
 
196
 
 
197
void StubSurface::rename(std::string const& /*title*/)
 
198
{
 
199
}