Mir
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_SHELL_H_
20 #define MIR_SHELL_SHELL_H_
21 
24 
25 #include "mir_toolkit/common.h"
26 
27 #include <memory>
28 
29 namespace mir
30 {
31 namespace frontend { class EventSink; }
32 namespace scene
33 {
34 class PromptSession;
35 class PromptSessionManager;
36 class PromptSessionCreationParameters;
37 class SessionCoordinator;
38 class Surface;
39 class SurfaceCoordinator;
40 class SurfaceCreationParameters;
41 }
42 
43 namespace shell
44 {
45 class InputTargeter;
46 
47 class Shell :
48 // TODO public virtual graphics::DisplayConfigurationPolicy,
49  public virtual FocusController
50 {
51 public:
54  virtual std::shared_ptr<scene::Session> open_session(
55  pid_t client_pid,
56  std::string const& name,
57  std::shared_ptr<frontend::EventSink> const& sink) = 0;
58 
59  virtual void close_session(std::shared_ptr<scene::Session> const& session) = 0;
60 
61  virtual void handle_surface_created(std::shared_ptr<scene::Session> const& session) = 0;
62 
63  virtual std::shared_ptr<scene::PromptSession> start_prompt_session_for(
64  std::shared_ptr<scene::Session> const& session,
65  scene::PromptSessionCreationParameters const& params) = 0;
66 
67  virtual void add_prompt_provider_for(
68  std::shared_ptr<scene::PromptSession> const& prompt_session,
69  std::shared_ptr<scene::Session> const& session) = 0;
70 
71  virtual void stop_prompt_session(std::shared_ptr<scene::PromptSession> const& prompt_session) = 0;
72 
73  virtual frontend::SurfaceId create_surface(std::shared_ptr<scene::Session> const& session, scene::SurfaceCreationParameters const& params) = 0;
74 
75  virtual void destroy_surface(std::shared_ptr<scene::Session> const& session, frontend::SurfaceId surface) = 0;
76 
77  virtual int set_surface_attribute(
78  std::shared_ptr<scene::Session> const& session,
79  std::shared_ptr<scene::Surface> const& surface,
80  MirSurfaceAttrib attrib,
81  int value) = 0;
82 
83  virtual int get_surface_attribute(
84  std::shared_ptr<scene::Surface> const& surface,
85  MirSurfaceAttrib attrib) = 0;
87 };
88 }
89 }
90 
91 #endif /* MIR_SHELL_SHELL_H_ */
Definition: shell.h:47
All things Mir.
Definition: buffer_stream.h:37
virtual std::shared_ptr< scene::PromptSession > start_prompt_session_for(std::shared_ptr< scene::Session > const &session, scene::PromptSessionCreationParameters const &params)=0
Definition: focus_controller.h:34
virtual void stop_prompt_session(std::shared_ptr< scene::PromptSession > const &prompt_session)=0
virtual int set_surface_attribute(std::shared_ptr< scene::Session > const &session, std::shared_ptr< scene::Surface > const &surface, MirSurfaceAttrib attrib, int value)=0
virtual void destroy_surface(std::shared_ptr< scene::Session > const &session, frontend::SurfaceId surface)=0
MirSurfaceAttrib
Attributes of a surface that the client and server/shell may wish to get or set over the wire...
Definition: common.h:36
virtual void handle_surface_created(std::shared_ptr< scene::Session > const &session)=0
virtual std::shared_ptr< scene::Session > open_session(pid_t client_pid, std::string const &name, std::shared_ptr< frontend::EventSink > const &sink)=0
Definition: int_wrapper.h:27
virtual void add_prompt_provider_for(std::shared_ptr< scene::PromptSession > const &prompt_session, std::shared_ptr< scene::Session > const &session)=0
Definition: surface_creation_parameters.h:41
virtual int get_surface_attribute(std::shared_ptr< scene::Surface > const &surface, MirSurfaceAttrib attrib)=0
virtual void close_session(std::shared_ptr< scene::Session > const &session)=0
Definition: prompt_session_creation_parameters.h:29
virtual frontend::SurfaceId create_surface(std::shared_ptr< scene::Session > const &session, scene::SurfaceCreationParameters const &params)=0

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