Mir
default_persistent_surface_store.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
5  * it under the terms of the GNU General Public License version 3 as
6  * 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: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
17  */
18 
19 #ifndef MIR_SHELL_DEFAULT_PERSISTENT_SURFACE_STORE_H_
20 #define MIR_SHELL_DEFAULT_PERSISTENT_SURFACE_STORE_H_
21 
23 
24 namespace mir
25 {
26 namespace shell
27 {
29 {
30 public:
33 
34  Id id_for_surface(std::shared_ptr<scene::Surface> const& surface) override;
35  std::shared_ptr<scene::Surface> surface_for_id(Id const& id) const override;
36 
37 private:
38  class SurfaceIdBimap;
39  std::unique_ptr<SurfaceIdBimap> const store;
40 };
41 }
42 }
43 
44 #endif // MIR_SHELL_DEFAULT_PERSISTENT_SURFACE_STORE_H_
All things Mir.
Definition: atomic_callback.h:25
std::shared_ptr< scene::Surface > surface_for_id(Id const &id) const override
Lookup Surface by ID.
Definition: default_persistent_surface_store.h:28
A store for Surface information divorced from the lifetime of any given Session.
Definition: persistent_surface_store.h:46
Definition: persistent_surface_store.h:85
Id id_for_surface(std::shared_ptr< scene::Surface > const &surface) override
Acquire ID for a Surface.

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Sep 8 14:50:19 UTC 2016