A policy based window manager. This takes care of the management of any meta implementation held for the sessions and surfaces.
More...
|
void | add_session (std::shared_ptr< scene::Session > const &session) override |
|
void | remove_session (std::shared_ptr< scene::Session > const &session) override |
|
frontend::SurfaceId | add_surface (std::shared_ptr< scene::Session > const &session, scene::SurfaceCreationParameters const ¶ms, std::function< frontend::SurfaceId(std::shared_ptr< scene::Session > const &session, scene::SurfaceCreationParameters const ¶ms)> const &build) override |
|
void | modify_surface (std::shared_ptr< scene::Session > const &session, std::shared_ptr< scene::Surface > const &surface, shell::SurfaceSpecification const &modifications) override |
|
void | remove_surface (std::shared_ptr< scene::Session > const &session, std::weak_ptr< scene::Surface > const &surface) override |
|
void | add_display (geometry::Rectangle const &area) override |
|
void | remove_display (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< scene::Session > const &, std::shared_ptr< scene::Surface > const &surface, MirSurfaceAttrib attrib, int value) override |
|
auto | find_session (std::function< bool(SessionInfo const &info)> const &predicate) -> std::shared_ptr< scene::Session > override |
|
auto | info_for (std::weak_ptr< scene::Session > const &session) const -> SessionInfo &override |
|
auto | info_for (std::weak_ptr< scene::Surface > const &surface) const -> SurfaceInfo &override |
|
auto | focused_session () const -> std::shared_ptr< scene::Session > override |
|
auto | focused_surface () const -> std::shared_ptr< scene::Surface > override |
|
void | focus_next_session () override |
|
void | set_focus_to (std::shared_ptr< scene::Session > const &focus, std::shared_ptr< scene::Surface > const &surface) override |
|
auto | surface_at (geometry::Point cursor) const -> std::shared_ptr< scene::Surface > override |
|
void | raise (SurfaceSet const &surfaces) override |
|
auto | active_display () -> geometry::Rectangle const override |
|
template<typename WindowManagementPolicy, typename SessionInfo, typename SurfaceInfo>
class mir::shell::BasicWindowManager< WindowManagementPolicy, SessionInfo, SurfaceInfo >
A policy based window manager. This takes care of the management of any meta implementation held for the sessions and surfaces.
- Template Parameters
-
WindowManagementPolicy | the constructor must take a pointer to BasicWindowManagerTools<> as its first parameter. (Any additional parameters can be forwarded by BasicWindowManager::BasicWindowManager.) In addition WindowManagementPolicy must implement the following methods:
- void handle_session_info_updated(SessionInfoMap& session_info, Rectangles const& displays);
- void handle_displays_updated(SessionInfoMap& session_info, Rectangles const& displays);
- auto handle_place_new_surface(std::shared_ptr<ms::Session> const& session, ms::SurfaceCreationParameters const& request_parameters) -> ms::SurfaceCreationParameters;
- void handle_new_surface(std::shared_ptr<ms::Session> const& session, std::shared_ptr<ms::Surface> const& surface);
- void handle_delete_surface(std::shared_ptr<ms::Session> const& /*session*/, std::weak_ptr<ms::Surface> const& /*surface*/);
- int handle_set_state(std::shared_ptr<ms::Surface> const& surface, MirSurfaceState value);
- bool handle_keyboard_event(MirKeyboardEvent const* event);
- bool handle_touch_event(MirTouchEvent const* event);
- bool handle_pointer_event(MirPointerEvent const* event);
|
SessionInfo | must be default constructable. |
SurfaceInfo | must be constructable from (std::shared_ptr<ms::Session>, std::shared_ptr<ms::Surface>, ms::SurfaceCreationParameters const& params) |