Mir
shell_wrapper.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_SHELL_WRAPPER_H_
20 #define MIR_SHELL_SHELL_WRAPPER_H_
21 
22 #include "mir/shell/shell.h"
23 
24 namespace mir
25 {
26 namespace shell
27 {
28 class ShellWrapper : public Shell
29 {
30 public:
31  explicit ShellWrapper(std::shared_ptr<Shell> const& wrapped);
32 
33  void focus_next() override;
34 
35  std::weak_ptr<scene::Session> focussed_application() const override;
36 
37  void set_focus_to(std::shared_ptr<scene::Session> const& focus) override;
38 
39  std::shared_ptr<scene::Session> open_session(
40  pid_t client_pid,
41  std::string const& name,
42  std::shared_ptr<frontend::EventSink> const& sink) override;
43 
44  void close_session(std::shared_ptr<scene::Session> const& session) override;
45 
46  void handle_surface_created(std::shared_ptr<scene::Session> const& session) override;
47 
48  std::shared_ptr<scene::PromptSession> start_prompt_session_for(
49  std::shared_ptr<scene::Session> const& session,
50  scene::PromptSessionCreationParameters const& params) override;
51 
53  std::shared_ptr<scene::PromptSession> const& prompt_session,
54  std::shared_ptr<scene::Session> const& session) override;
55 
56  void stop_prompt_session(std::shared_ptr<scene::PromptSession> const& prompt_session) override;
57 
58  frontend::SurfaceId create_surface(std::shared_ptr<scene::Session> const& session, scene::SurfaceCreationParameters const& params) override;
59 
60  void destroy_surface(std::shared_ptr<scene::Session> const& session, frontend::SurfaceId surface) override;
61 
63  std::shared_ptr<scene::Session> const& session,
64  std::shared_ptr<scene::Surface> const& surface,
65  MirSurfaceAttrib attrib,
66  int value) override;
67 
69  std::shared_ptr<scene::Surface> const& surface,
70  MirSurfaceAttrib attrib) override;
71 
72 protected:
73  std::shared_ptr<Shell> const wrapped;
74 };
75 }
76 }
77 
78 #endif /* MIR_SHELL_SHELL_WRAPPER_H_ */
Definition: shell.h:47
All things Mir.
Definition: buffer_stream.h:37
void add_prompt_provider_for(std::shared_ptr< scene::PromptSession > const &prompt_session, std::shared_ptr< scene::Session > const &session) override
void stop_prompt_session(std::shared_ptr< scene::PromptSession > const &prompt_session) override
int get_surface_attribute(std::shared_ptr< scene::Surface > const &surface, MirSurfaceAttrib attrib) override
frontend::SurfaceId create_surface(std::shared_ptr< scene::Session > const &session, scene::SurfaceCreationParameters const &params) override
ShellWrapper(std::shared_ptr< Shell > const &wrapped)
Definition: shell_wrapper.cpp:25
std::shared_ptr< scene::Session > open_session(pid_t client_pid, std::string const &name, std::shared_ptr< frontend::EventSink > const &sink) override
Definition: shell_wrapper.h:28
void set_focus_to(std::shared_ptr< scene::Session > const &focus) override
Definition: shell_wrapper.cpp:53
int set_surface_attribute(std::shared_ptr< scene::Session > const &session, std::shared_ptr< scene::Surface > const &surface, MirSurfaceAttrib attrib, int value) override
std::shared_ptr< scene::PromptSession > start_prompt_session_for(std::shared_ptr< scene::Session > const &session, scene::PromptSessionCreationParameters const &params) override
std::weak_ptr< scene::Session > focussed_application() const override
Definition: shell_wrapper.cpp:48
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
void focus_next() override
Definition: shell_wrapper.cpp:43
Definition: surface_creation_parameters.h:41
void close_session(std::shared_ptr< scene::Session > const &session) override
void handle_surface_created(std::shared_ptr< scene::Session > const &session) override
void destroy_surface(std::shared_ptr< scene::Session > const &session, frontend::SurfaceId surface) override
Definition: prompt_session_creation_parameters.h:29
std::shared_ptr< Shell > const wrapped
Definition: shell_wrapper.h:73

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