TYPE3
[iec.git] / src / type3_AndroidCloud / anbox-master / src / anbox / platform / null / platform.cpp
1 /*
2  * Copyright (C) 2016 Simon Fels <morphis@gravedo.de>
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 3, as published
6  * by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranties of
10  * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
11  * PURPOSE.  See the GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License along
14  * with this program.  If not, see <http://www.gnu.org/licenses/>.
15  *
16  */
17
18 #include "anbox/platform/null/platform.h"
19 #include "anbox/wm/window.h"
20 #include "anbox/logger.h"
21
22 namespace {
23 class NullWindow : public anbox::wm::Window {
24  public:
25   NullWindow(const anbox::wm::Task::Id &task,
26              const anbox::graphics::Rect &frame,
27              const std::string &title)
28       : anbox::wm::Window(nullptr, task, frame, title) {}
29 };
30 }
31
32 namespace anbox {
33 namespace platform {
34 NullPlatform::NullPlatform() {}
35
36 std::shared_ptr<wm::Window> NullPlatform::create_window(
37     const anbox::wm::Task::Id &task, const anbox::graphics::Rect &frame, const std::string &title) {
38   return std::make_shared<::NullWindow>(task, frame, title);
39 }
40
41 void NullPlatform::set_clipboard_data(const ClipboardData &data) {
42   (void)data;
43   ERROR("Not implemented");
44 }
45
46 NullPlatform::ClipboardData NullPlatform::get_clipboard_data() {
47   ERROR("Not implemented");
48   return ClipboardData{};
49 }
50
51 std::shared_ptr<audio::Sink> NullPlatform::create_audio_sink() {
52   ERROR("Not implemented");
53   return nullptr;
54 }
55
56 std::shared_ptr<audio::Source> NullPlatform::create_audio_source() {
57   ERROR("Not implemented");
58   return nullptr;
59 }
60
61 void NullPlatform::set_renderer(const std::shared_ptr<Renderer> &renderer) {
62   (void) renderer;
63   ERROR("Not implemented");
64 }
65
66 void NullPlatform::set_window_manager(const std::shared_ptr<wm::Manager> &window_manager) {
67   (void) window_manager;
68   ERROR("Not implemented");
69 }
70
71 bool NullPlatform::supports_multi_window() const {
72   return false;
73 }
74 }  // namespace wm
75 }  // namespace anbox