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_SINGLE_WINDOW_MANAGER_H_
19 #define ANBOX_WM_SINGLE_WINDOW_MANAGER_H_
21 #include "anbox/wm/manager.h"
28 namespace application {
30 } // namespace application
33 } // namespace platform
36 class SingleWindowManager : public Manager {
38 SingleWindowManager(const std::weak_ptr<platform::BasePlatform> &platform,
39 const graphics::Rect &window_size,
40 const std::shared_ptr<application::Database> &app_db);
41 ~SingleWindowManager();
43 void setup() override;
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;
55 std::weak_ptr<platform::BasePlatform> platform_;
56 graphics::Rect window_size_;
57 std::shared_ptr<application::Database> app_db_;
58 std::shared_ptr<Window> window_;