/* * Copyright © 2015 Canonical Ltd. * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License version 3, as published by * the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . */ #ifndef QPAMIRSERVER_WINDOW_MANAGER_H #define QPAMIRSERVER_WINDOW_MANAGER_H #include #include namespace mir { namespace shell { class DisplayLayout; } } class MirWindowManager : public QObject, public mir::shell::WindowManager { Q_OBJECT public: MirWindowManager(const std::shared_ptr &displayLayout); void add_session(std::shared_ptr const& session) override; void remove_session(std::shared_ptr const& session) override; mir::frontend::SurfaceId add_surface( std::shared_ptr const& session, mir::scene::SurfaceCreationParameters const& params, std::function const& session, mir::scene::SurfaceCreationParameters const& params)> const& build) override; void remove_surface( std::shared_ptr const& session, std::weak_ptr const& surface) override; void add_display(mir::geometry::Rectangle const& area) override; void remove_display(mir::geometry::Rectangle const& area) override; bool handle_keyboard_event(MirKeyboardEvent const* event) override; bool handle_touch_event(MirTouchEvent const* event) override; bool handle_pointer_event(MirPointerEvent const* event) override; int set_surface_attribute( std::shared_ptr const& session, std::shared_ptr const& surface, MirSurfaceAttrib attrib, int value) override; void modify_surface(const std::shared_ptr&, const std::shared_ptr&, const mir::shell::SurfaceSpecification&); private: std::shared_ptr const m_displayLayout; }; #endif /* QPAMIRSERVER_WINDOW_MANAGER_H */