Mir
Public Member Functions | List of all members
mir::shell::DefaultPersistentSurfaceStore Class Reference

#include <default_persistent_surface_store.h>

Inheritance diagram for mir::shell::DefaultPersistentSurfaceStore:
[legend]

Public Member Functions

 DefaultPersistentSurfaceStore ()
 
 ~DefaultPersistentSurfaceStore () override
 
Id id_for_surface (std::shared_ptr< scene::Surface > const &surface) override
 Acquire ID for a Surface. More...
 
std::shared_ptr< scene::Surfacesurface_for_id (Id const &id) const override
 Lookup Surface by ID. More...
 
- Public Member Functions inherited from mir::shell::PersistentSurfaceStore
virtual ~PersistentSurfaceStore ()=default
 

Constructor & Destructor Documentation

mir::shell::DefaultPersistentSurfaceStore::DefaultPersistentSurfaceStore ( )
mir::shell::DefaultPersistentSurfaceStore::~DefaultPersistentSurfaceStore ( )
override

Member Function Documentation

Id mir::shell::DefaultPersistentSurfaceStore::id_for_surface ( std::shared_ptr< scene::Surface > const &  surface)
overridevirtual

Acquire ID for a Surface.

Parameters
[in]surfaceSurface to query or generate an ID for
Returns
The ID for this surface.
Note
If
  • surface has not yet had an ID generated, this generates its ID.
This does not extend the lifetime of
  • surface.

Implements mir::shell::PersistentSurfaceStore.

std::shared_ptr<scene::Surface> mir::shell::DefaultPersistentSurfaceStore::surface_for_id ( Id const &  id) const
overridevirtual

Lookup Surface by ID.

Parameters
[in]idID of surface to lookup
Returns
The surface with ID
  • id. If this surface has been destroyed, but the store retains a reference, returns nullptr.
Exceptions
std::out_of_rangeif the store has no reference for a surface with
  • id.

Implements mir::shell::PersistentSurfaceStore.


The documentation for this class was generated from the following file:

Copyright © 2012-2015 Canonical Ltd.
Generated on Wed Mar 30 00:29:56 UTC 2016