Mir
session_coordinator.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2014 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_SCENE_SESSION_COORDINATOR_H_
20 #define MIR_SCENE_SESSION_COORDINATOR_H_
21 
23 
24 #include "mir_toolkit/common.h"
25 
26 #include <memory>
27 
28 namespace mir
29 {
30 namespace frontend
31 {
32 class EventSink;
33 }
34 
35 namespace scene
36 {
37 class Session;
38 class Surface;
39 struct SurfaceCreationParameters;
40 
42 {
43 public:
44  virtual void set_focus_to(std::shared_ptr<Session> const& focus) = 0;
45  virtual void unset_focus() = 0;
46 
47  virtual std::shared_ptr<Session> open_session(
48  pid_t client_pid,
49  std::string const& name,
50  std::shared_ptr<frontend::EventSink> const& sink) = 0;
51 
52  virtual void close_session(std::shared_ptr<Session> const& session) = 0;
53 
54  virtual std::shared_ptr<Session> successor_of(std::shared_ptr<Session> const&) const = 0;
55 
56 protected:
57  SessionCoordinator() = default;
58  virtual ~SessionCoordinator() = default;
59  SessionCoordinator(SessionCoordinator const&) = delete;
60  SessionCoordinator& operator=(SessionCoordinator const&) = delete;
61 };
62 
63 }
64 }
65 
66 #endif /* MIR_SCENE_SESSION_COORDINATOR_H_ */
Definition: as_render_target.h:27
Definition: session_coordinator.h:41
char const * name
Definition: client_types.h:170

Copyright © 2012-2016 Canonical Ltd.
Generated on Wed Oct 11 22:26:23 UTC 2017