Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
shell.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012-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: Thomas Voss <thomas.voss@canonical.com>
17  */
18 
19 #ifndef MIR_FRONTEND_SHELL_H_
20 #define MIR_FRONTEND_SHELL_H_
21 
23 
24 #include <sys/types.h>
25 
26 #include <memory>
27 
28 namespace mir
29 {
30 namespace shell
31 {
32 struct SurfaceCreationParameters;
33 }
34 namespace frontend
35 {
36 class EventSink;
37 class Session;
38 
39 class Shell
40 {
41 public:
42  virtual ~Shell() = default;
43 
44  virtual std::shared_ptr<Session> open_session(
45  pid_t client_pid,
46  std::string const& name,
47  std::shared_ptr<EventSink> const& sink) = 0;
48 
49  virtual void close_session(std::shared_ptr<Session> const& session) = 0;
50 
51  virtual SurfaceId create_surface_for(std::shared_ptr<Session> const& session,
52  shell::SurfaceCreationParameters const& params) = 0;
53 
54  virtual void handle_surface_created(std::shared_ptr<Session> const& session) = 0;
55 
56 protected:
57  Shell() = default;
58  Shell(const Shell&) = delete;
59  Shell& operator=(const Shell&) = delete;
60 };
61 
62 }
63 }
64 
65 #endif // MIR_FRONTEND_SHELL_H_
Definition: surface_creation_parameters.h:38
Shell & operator=(const Shell &)=delete
virtual ~Shell()=default
Definition: shell.h:39
virtual void handle_surface_created(std::shared_ptr< Session > const &session)=0
virtual void close_session(std::shared_ptr< Session > const &session)=0
Definition: int_wrapper.h:27
virtual SurfaceId create_surface_for(std::shared_ptr< Session > const &session, shell::SurfaceCreationParameters const &params)=0
virtual std::shared_ptr< Session > open_session(pid_t client_pid, std::string const &name, std::shared_ptr< EventSink > const &sink)=0

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Apr 11 21:14:53 UTC 2014