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>

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...
 
virtual bool translation_supported () const =0
 

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.
virtual bool mir::scene::CoordinateTranslator::translation_supported ( ) const
pure virtual

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

Copyright © 2012-2016 Canonical Ltd.
Generated on Wed May 10 10:41:27 UTC 2017