Mir
default_shell.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2015 Canonical Ltd.
3  *
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,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored By: Alan Griffiths <alan@octopull.co.uk>
17  */
18 
19 #ifndef MIR_SHELL_DEFAULT_SHELL_H_
20 #define MIR_SHELL_DEFAULT_SHELL_H_
21 
23 
24 namespace mir
25 {
26 namespace scene { class PlacementStrategy; class SurfaceConfigurator; }
27 
28 namespace shell
29 {
34 {
35 public:
37  std::shared_ptr<InputTargeter> const& input_targeter,
38  std::shared_ptr<scene::SurfaceCoordinator> const& surface_coordinator,
39  std::shared_ptr<scene::SessionCoordinator> const& session_coordinator,
40  std::shared_ptr<scene::PromptSessionManager> const& prompt_session_manager,
41  std::shared_ptr<scene::PlacementStrategy> const& placement_strategy,
42  std::shared_ptr<scene::SurfaceConfigurator> const& surface_configurator);
43 
46  std::shared_ptr<scene::Session> open_session(
47  pid_t client_pid,
48  std::string const& name,
49  std::shared_ptr<frontend::EventSink> const& sink) override;
50 
51  void close_session(std::shared_ptr<scene::Session> const& session) override;
52 
53  void handle_surface_created(std::shared_ptr<scene::Session> const& session) override;
54 
55  frontend::SurfaceId create_surface(std::shared_ptr<scene::Session> const& session, scene::SurfaceCreationParameters const& params) override;
56 
58  std::shared_ptr<scene::Session> const& session,
59  std::shared_ptr<scene::Surface> const& surface,
60  MirSurfaceAttrib attrib,
61  int value) override;
64 private:
65  std::shared_ptr<scene::PlacementStrategy> const placement_strategy;
66  std::shared_ptr<scene::SurfaceConfigurator> const surface_configurator;
67 
68  void setting_focus_to(std::shared_ptr<scene::Surface> const& surface) override;
69 };
70 }
71 }
72 
73 #endif /* MIR_SHELL_DEFAULT_SHELL_H_ */
All things Mir.
Definition: buffer_stream.h:37
std::shared_ptr< scene::SurfaceCoordinator > const surface_coordinator
Definition: abstract_shell.h:92
frontend::SurfaceId create_surface(std::shared_ptr< scene::Session > const &session, scene::SurfaceCreationParameters const &params) override
Definition: default_shell.cpp:72
std::shared_ptr< scene::SessionCoordinator > const session_coordinator
Definition: abstract_shell.h:93
std::shared_ptr< InputTargeter > const input_targeter
Definition: abstract_shell.h:91
std::shared_ptr< scene::Session > open_session(pid_t client_pid, std::string const &name, std::shared_ptr< frontend::EventSink > const &sink) override
Definition: default_shell.cpp:48
void handle_surface_created(std::shared_ptr< scene::Session > const &session) override
Definition: default_shell.cpp:65
Default shell implementation.
Definition: default_shell.h:33
MirSurfaceAttrib
Attributes of a surface that the client and server/shell may wish to get or set over the wire...
Definition: common.h:36
Definition: int_wrapper.h:27
int set_surface_attribute(std::shared_ptr< scene::Session > const &session, std::shared_ptr< scene::Surface > const &surface, MirSurfaceAttrib attrib, int value) override
Definition: default_shell.cpp:77
void close_session(std::shared_ptr< scene::Session > const &session) override
Definition: default_shell.cpp:58
Definition: surface_creation_parameters.h:41
std::shared_ptr< scene::PromptSessionManager > const prompt_session_manager
Definition: abstract_shell.h:94
Minimal Shell implementation with none of the necessary window management logic.
Definition: abstract_shell.h:31
DefaultShell(std::shared_ptr< InputTargeter > const &input_targeter, std::shared_ptr< scene::SurfaceCoordinator > const &surface_coordinator, std::shared_ptr< scene::SessionCoordinator > const &session_coordinator, std::shared_ptr< scene::PromptSessionManager > const &prompt_session_manager, std::shared_ptr< scene::PlacementStrategy > const &placement_strategy, std::shared_ptr< scene::SurfaceConfigurator > const &surface_configurator)
Definition: default_shell.cpp:35

Copyright © 2012,2013 Canonical Ltd.
Generated on Tue Mar 24 16:15:19 UTC 2015