Mir
Functions
surface.h File Reference
#include <mir_toolkit/mir_client_library.h>
Include dependency graph for surface.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int mir_debug_surface_id (MirSurface *surface)
 Return the ID of a surface (only useful for debug output). More...
 
uint32_t mir_debug_surface_current_buffer_id (MirSurface *surface)
 Get the ID of the surface's current buffer (only useful for debug purposes) More...
 
bool mir_debug_surface_coords_to_screen (MirSurface *surface, int x, int y, int *screen_x, int *screen_y)
 Get the screen coordinates corresponding to a pair of surface coordinates. More...
 

Function Documentation

bool mir_debug_surface_coords_to_screen ( MirSurface surface,
int  x,
int  y,
int *  screen_x,
int *  screen_y 
)

Get the screen coordinates corresponding to a pair of surface coordinates.

Precondition
The surface is valid
Parameters
[in]surfaceThe surface
[in]x,ySurface coordinates to map to screen coordinates
[out]screen_x,screen_yThe screen coordinates corresponding to x, y.
Returns
True if screen_x and screen_y contain values
Note
There are many cases where such a mapping does not exist or would be expensive to calculate. Only Mir servers started with the –debug option will ever return values for this call, and even when –debug is enabled servers are free to return nothing.

This call will only be interesting for automated testing, where both the client and shell state is known and constrained.

uint32_t mir_debug_surface_current_buffer_id ( MirSurface surface)

Get the ID of the surface's current buffer (only useful for debug purposes)

Precondition
The surface is valid
Parameters
[in]surfaceThe surface
Returns
The internal buffer ID of the surface's current buffer. This is the buffer that is currently being drawn to, and would be returned by mir_surface_get_current_buffer.
int mir_debug_surface_id ( MirSurface surface)

Return the ID of a surface (only useful for debug output).

Precondition
The surface is valid
Parameters
[in]surfaceThe surface
Returns
An internal ID that identifies the surface

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Oct 8 16:20:16 UTC 2015