2 * Copyright (C) 2016 Simon Fels <morphis@gravedo.de>
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.
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.
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/>.
18 #ifndef ANBOX_WM_MULTI_WINDOW_MANAGER_H_
19 #define ANBOX_WM_MULTI_WINDOW_MANAGER_H_
21 #include "anbox/wm/manager.h"
28 namespace application {
30 } // namespace application
36 } // namespace platform
38 class MultiWindowManager : public Manager {
40 MultiWindowManager(const std::weak_ptr<platform::BasePlatform> &platform,
41 const std::shared_ptr<bridge::AndroidApiStub> &android_api_stub,
42 const std::shared_ptr<application::Database> &app_db);
43 ~MultiWindowManager();
45 void apply_window_state_update(const WindowState::List &updated, const WindowState::List &removed) override;
47 std::shared_ptr<Window> find_window_for_task(const Task::Id &task) override;
49 void resize_task(const Task::Id &task, const anbox::graphics::Rect &rect,
50 const std::int32_t &resize_mode) override;
51 void set_focused_task(const Task::Id &task) override;
52 void remove_task(const Task::Id &task) override;
56 std::weak_ptr<platform::BasePlatform> platform_;
57 std::shared_ptr<bridge::AndroidApiStub> android_api_stub_;
58 std::shared_ptr<application::Database> app_db_;
59 std::map<Task::Id, std::shared_ptr<Window>> windows_;