19 #ifndef MIR_SHELL_ABSTRACT_SHELL_H_ 20 #define MIR_SHELL_ABSTRACT_SHELL_H_ 43 std::shared_ptr<ShellReport>
const& report,
51 std::shared_ptr<frontend::EventSink>
const& sink)
override;
53 void close_session(std::shared_ptr<scene::Session>
const& session)
override;
56 std::shared_ptr<scene::Session>
const& session,
58 std::shared_ptr<frontend::EventSink>
const& sink)
override;
60 void modify_surface(std::shared_ptr<scene::Session>
const& session, std::shared_ptr<scene::Surface>
const& surface,
SurfaceSpecification const& modifications)
override;
65 std::shared_ptr<scene::Session>
const& session,
66 std::shared_ptr<scene::Surface>
const& surface,
71 std::shared_ptr<scene::Surface>
const& surface,
75 std::shared_ptr<scene::Session>
const& session,
76 std::shared_ptr<scene::Surface>
const& surface,
77 uint64_t timestamp)
override;
80 std::shared_ptr<scene::Session>
const& session,
84 std::shared_ptr<scene::PromptSession>
const& prompt_session,
85 std::shared_ptr<scene::Session>
const& session)
override;
87 void stop_prompt_session(std::shared_ptr<scene::PromptSession>
const& prompt_session)
override;
103 std::shared_ptr<scene::Session>
const& focus_session,
104 std::shared_ptr<scene::Surface>
const& focus_surface)
override;
111 void raise(
SurfaceSet const& surfaces)
override;
127 std::shared_ptr<ShellReport>
const report;
129 std::mutex
mutable focus_mutex;
130 std::weak_ptr<scene::Surface> focus_surface;
131 std::weak_ptr<scene::Session> focus_session;
133 void set_focus_to_locked(
134 std::unique_lock<std::mutex>
const& lock,
135 std::shared_ptr<scene::Session>
const& focus_session,
136 std::shared_ptr<scene::Surface>
const& focus_surface);
All things Mir.
Definition: atomic_callback.h:25
std::shared_ptr< scene::Session > focused_session() const override
Definition: abstract_shell.cpp:196
void add_display(geometry::Rectangle const &area) override
Definition: abstract_shell.cpp:262
void add_prompt_provider_for(std::shared_ptr< scene::PromptSession > const &prompt_session, std::shared_ptr< scene::Session > const &session) override
Definition: abstract_shell.cpp:135
~AbstractShell() noexcept
Definition: abstract_shell.cpp:51
std::shared_ptr< scene::Surface > focused_surface() const override
Definition: abstract_shell.cpp:202
void raise_surface(std::shared_ptr< scene::Session > const &session, std::shared_ptr< scene::Surface > const &surface, uint64_t timestamp) override
Definition: abstract_shell.cpp:167
frontend::SurfaceId create_surface(std::shared_ptr< scene::Session > const &session, scene::SurfaceCreationParameters const ¶ms, std::shared_ptr< frontend::EventSink > const &sink) override
Definition: abstract_shell.cpp:88
void close_session(std::shared_ptr< scene::Session > const &session) override
Definition: abstract_shell.cpp:66
void modify_surface(std::shared_ptr< scene::Session > const &session, std::shared_ptr< scene::Surface > const &surface, SurfaceSpecification const &modifications) override
Definition: abstract_shell.cpp:103
std::set< std::weak_ptr< scene::Surface >, std::owner_less< std::weak_ptr< scene::Surface >>> SurfaceSet
Definition: focus_controller.h:32
int set_surface_attribute(std::shared_ptr< scene::Session > const &session, std::shared_ptr< scene::Surface > const &surface, MirSurfaceAttrib attrib, int value) override
Definition: abstract_shell.cpp:150
std::shared_ptr< scene::SessionCoordinator > const session_coordinator
Definition: abstract_shell.h:122
std::shared_ptr< InputTargeter > const input_targeter
Definition: abstract_shell.h:120
Definition: focus_controller.h:38
int get_surface_attribute(std::shared_ptr< scene::Surface > const &surface, MirSurfaceAttrib attrib) override
Definition: abstract_shell.cpp:160
void set_focus_to(std::shared_ptr< scene::Session > const &focus_session, std::shared_ptr< scene::Surface > const &focus_surface) override
Definition: abstract_shell.cpp:208
void stop_prompt_session(std::shared_ptr< scene::PromptSession > const &prompt_session) override
Definition: abstract_shell.cpp:143
auto surface_at(geometry::Point cursor) const -> std::shared_ptr< scene::Surface > override
Definition: abstract_shell.cpp:296
AbstractShell(std::shared_ptr< InputTargeter > const &input_targeter, std::shared_ptr< SurfaceStack > const &surface_stack, std::shared_ptr< scene::SessionCoordinator > const &session_coordinator, std::shared_ptr< scene::PromptSessionManager > const &prompt_session_manager, std::shared_ptr< ShellReport > const &report, WindowManagerBuilder const &wm_builder)
Definition: abstract_shell.cpp:35
void focus_next_session() override
Definition: abstract_shell.cpp:175
Definition: surface_creation_parameters.h:41
std::shared_ptr< scene::PromptSession > start_prompt_session_for(std::shared_ptr< scene::Session > const &session, scene::PromptSessionCreationParameters const ¶ms) override
Definition: abstract_shell.cpp:126
Definition: rectangle.h:33
std::shared_ptr< scene::PromptSessionManager > const prompt_session_manager
Definition: abstract_shell.h:123
bool handle(MirEvent const &event) override
Definition: abstract_shell.cpp:274
void remove_display(geometry::Rectangle const &area) override
Definition: abstract_shell.cpp:268
Definition: prompt_session_creation_parameters.h:29
void destroy_surface(std::shared_ptr< scene::Session > const &session, frontend::SurfaceId surface) override
Definition: abstract_shell.cpp:118
Definition: event_private.h:181
Specification of surface properties requested by client.
Definition: surface_specification.h:49
std::shared_ptr< SurfaceStack > const surface_stack
Definition: abstract_shell.h:121
std::shared_ptr< WindowManager > const window_manager
Definition: abstract_shell.h:124
Minimal Shell implementation with none of the necessary window management logic.
Definition: abstract_shell.h:35
std::shared_ptr< scene::Session > open_session(pid_t client_pid, std::string const &name, std::shared_ptr< frontend::EventSink > const &sink) override
Definition: abstract_shell.cpp:55
std::function< std::shared_ptr< WindowManager >(FocusController *focus_controller)> WindowManagerBuilder
WindowManagers are built while initializing an AbstractShell, so a builder functor is needed...
Definition: window_manager_builder.h:34