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 
23 #include "mir/input/event_filter.h"
26 
27 #include "mir_toolkit/common.h"
28 
29 #include <memory>
30 
31 namespace mir
32 {
33 namespace frontend { class EventSink; }
34 namespace geometry { struct Rectangle; }
35 namespace scene
36 {
37 class PromptSession;
38 class PromptSessionManager;
39 class PromptSessionCreationParameters;
40 class SessionCoordinator;
41 class Surface;
42 struct SurfaceCreationParameters;
43 }
44 
45 namespace shell
46 {
47 class InputTargeter;
48 struct SurfaceSpecification;
49 class SurfaceStack;
50 
51 class Shell :
52  public virtual FocusController,
53  public virtual input::EventFilter,
54  public virtual compositor::DisplayListener
55 {
56 public:
59  virtual std::shared_ptr<scene::Session> open_session(
60  pid_t client_pid,
61  std::string const& name,
62  std::shared_ptr<frontend::EventSink> const& sink) = 0;
63 
64  virtual void close_session(std::shared_ptr<scene::Session> const& session) = 0;
65 
66  virtual std::shared_ptr<scene::PromptSession> start_prompt_session_for(
67  std::shared_ptr<scene::Session> const& session,
68  scene::PromptSessionCreationParameters const& params) = 0;
69 
70  virtual void add_prompt_provider_for(
71  std::shared_ptr<scene::PromptSession> const& prompt_session,
72  std::shared_ptr<scene::Session> const& session) = 0;
73 
74  virtual void stop_prompt_session(std::shared_ptr<scene::PromptSession> const& prompt_session) = 0;
75 
76  virtual frontend::SurfaceId create_surface(
77  std::shared_ptr<scene::Session> const& session,
79  std::shared_ptr<frontend::EventSink> const& sink) = 0;
80 
81  virtual void modify_surface(
82  std::shared_ptr<scene::Session> const& session,
83  std::shared_ptr<scene::Surface> const& surface,
84  shell::SurfaceSpecification const& modifications) = 0;
85 
86  virtual void destroy_surface(std::shared_ptr<scene::Session> const& session, frontend::SurfaceId surface) = 0;
87 
88  virtual int set_surface_attribute(
89  std::shared_ptr<scene::Session> const& session,
90  std::shared_ptr<scene::Surface> const& surface,
91  MirWindowAttrib attrib,
92  int value) = 0;
93 
94  virtual int get_surface_attribute(
95  std::shared_ptr<scene::Surface> const& surface,
96  MirWindowAttrib attrib) = 0;
97 
98  virtual void raise_surface(
99  std::shared_ptr<scene::Session> const& session,
100  std::shared_ptr<scene::Surface> const& surface,
101  uint64_t timestamp) = 0;
102 
104 };
105 }
106 }
107 
108 #endif /* MIR_SHELL_SHELL_H_ */
Definition: shell.h:51
Definition: as_render_target.h:27
MirWindowAttrib
Attributes of a window that the client and server/shell may wish to get or set over the wire...
Definition: common.h:76
Definition: display_listener.h:27
Definition: focus_controller.h:38
Definition: event_filter.h:29
Definition: surface_creation_parameters.h:41
char const * name
Definition: client_types.h:170
Definition: prompt_session_creation_parameters.h:29
Specification of surface properties requested by client.
Definition: surface_specification.h:57

Copyright © 2012-2016 Canonical Ltd.
Generated on Fri Dec 20 06:52:43 UTC 2019