Mir
Public Member Functions | List of all members
mir::scene::CoordinateTranslator Class Referenceabstract

Support for the debug "surface to screen" coordinate translation interface. More...

#include <coordinate_translator.h>

Inheritance diagram for mir::scene::CoordinateTranslator:
[legend]

Public Member Functions

virtual ~CoordinateTranslator ()=default
 
virtual geometry::Point surface_to_screen (std::shared_ptr< frontend::Surface > surface, int32_t x, int32_t y)=0
 Translate a surface coordinate into the screen coordinate space. More...
 

Detailed Description

Support for the debug "surface to screen" coordinate translation interface.

Note
For shells which do surface transformations the default implementation will return incorrect results.

Constructor & Destructor Documentation

virtual mir::scene::CoordinateTranslator::~CoordinateTranslator ( )
virtualdefault

Member Function Documentation

virtual geometry::Point mir::scene::CoordinateTranslator::surface_to_screen ( std::shared_ptr< frontend::Surface surface,
int32_t  x,
int32_t  y 
)
pure virtual

Translate a surface coordinate into the screen coordinate space.

Parameters
[in]surfaceA frontend::Surface. This will need to be dynamic_cast into the scene::Surface relevant for the shell.
[in]x,yCoordinates to translate from the surface coordinate space
Returns
The coordinates in the screen coordinate space.
Exceptions
Astd::runtime_error if the translation cannot be performed for any reason.
Note
It is acceptable for this call to unconditionally throw a std::runtime_error. It is not required for normal functioning of the server or clients; clients which use the debug extension will receive an appropriate failure notice.

Implemented in mir::scene::DefaultCoordinateTranslator.


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