Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions | Variables
mir_client_library.cpp File Reference
#include "mir/default_configuration.h"
#include "mir/raii.h"
#include "mir_toolkit/mir_client_library.h"
#include "mir_toolkit/mir_client_library_drm.h"
#include "mir_toolkit/mir_client_library_debug.h"
#include "mir_connection.h"
#include "display_configuration.h"
#include "mir_surface.h"
#include "egl_native_display_container.h"
#include "default_connection_configuration.h"
#include "lifecycle_control.h"
#include "api_impl_types.h"
#include <set>
#include <unordered_set>
#include <cstddef>
#include <cstring>
Include dependency graph for mir_client_library.cpp:

Functions

MirWaitHandlemir_default_connect (char const *socket_file, char const *name, mir_connected_callback callback, void *context)
 
void mir_default_connection_release (MirConnection *connection)
 
MirWaitHandlemir_connect (char const *socket_file, char const *name, mir_connected_callback callback, void *context)
 Request a connection to the Mir server. More...
 
void mir_connection_release (MirConnection *connection)
 Release a connection to the Mir server. More...
 
MirConnectionmir_connect_sync (char const *server, char const *app_name)
 Perform a mir_connect() but also wait for and return the result. More...
 
MirBool mir_connection_is_valid (MirConnection *connection)
 Test for a valid connection. More...
 
char const * mir_connection_get_error_message (MirConnection *connection)
 Retrieve a text description of the last error. More...
 
MirEGLNativeDisplayType mir_connection_get_egl_native_display (MirConnection *connection)
 Get a display type that can be used for OpenGL ES 2.0 acceleration. More...
 
void mir_connection_get_available_surface_formats (MirConnection *connection, MirPixelFormat *formats, unsigned const int format_size, unsigned int *num_valid_formats)
 Get the list of possible formats that a surface can be created with. More...
 
MirWaitHandlemir_connection_create_surface (MirConnection *connection, MirSurfaceParameters const *params, mir_surface_callback callback, void *context)
 Request a new Mir surface on the supplied connection with the supplied parameters. More...
 
MirSurfacemir_connection_create_surface_sync (MirConnection *connection, MirSurfaceParameters const *params)
 Create a surface like in mir_connection_create_surface(), but also wait for creation to complete and return the resulting surface. More...
 
void mir_surface_set_event_handler (MirSurface *surface, MirEventDelegate const *event_handler)
 Set the event handler to be called when events arrive for a surface. More...
 
MirWaitHandlemir_surface_release (MirSurface *surface, mir_surface_callback callback, void *context)
 Release the supplied surface and any associated buffer. More...
 
void mir_surface_release_sync (MirSurface *surface)
 Release the specified surface like in mir_surface_release(), but also wait for the operation to complete. More...
 
int mir_surface_get_id (MirSurface *surface)
 
int mir_debug_surface_id (MirSurface *surface)
 Return the ID of a surface (only useful for debug output). More...
 
MirBool mir_surface_is_valid (MirSurface *surface)
 Test for a valid surface. More...
 
char const * mir_surface_get_error_message (MirSurface *surface)
 Retrieve a text description of the error. More...
 
void mir_surface_get_parameters (MirSurface *surface, MirSurfaceParameters *parameters)
 Get a surface's parameters. More...
 
MirPlatformType mir_surface_get_platform_type (MirSurface *surface)
 Get the underlying platform type so the buffer obtained in "raw" representation in mir_surface_get_current_buffer() can be understood. More...
 
void mir_surface_get_current_buffer (MirSurface *surface, MirNativeBuffer **buffer_package_out)
 Get a surface's buffer in "raw" representation. 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...
 
void mir_connection_get_platform (MirConnection *connection, MirPlatformPackage *platform_package)
 Query platform-specific data and/or file descriptors that are required to initialize GL/EGL features. More...
 
MirDisplayConfigurationmir_connection_create_display_config (MirConnection *connection)
 Query the display. More...
 
void mir_display_config_destroy (MirDisplayConfiguration *configuration)
 Destroy the DisplayConfiguration resource acquired from mir_connection_create_display_config. More...
 
void mir_connection_get_display_info (MirConnection *connection, MirDisplayInfo *display_info)
 
void mir_surface_get_graphics_region (MirSurface *surface, MirGraphicsRegion *graphics_region)
 Get a surface's graphics_region, i.e., map the graphics buffer to main memory. More...
 
MirWaitHandlemir_surface_swap_buffers (MirSurface *surface, mir_surface_callback callback, void *context)
 Advance a surface's buffer. More...
 
void mir_surface_swap_buffers_sync (MirSurface *surface)
 Advance a surface's buffer as in mir_surface_swap_buffers(), but also wait for the operation to complete. More...
 
void mir_wait_for (MirWaitHandle *wait_handle)
 Wait on the supplied handle until all instances of the associated request have completed. More...
 
void mir_wait_for_one (MirWaitHandle *wait_handle)
 Wait on the supplied handle until one instance of the associated request has completed. More...
 
MirEGLNativeWindowType mir_surface_get_egl_native_window (MirSurface *surface)
 Get a window type that can be used for OpenGL ES 2.0 acceleration. More...
 
MirWaitHandlemir_surface_set_type (MirSurface *surf, MirSurfaceType type)
 Set the type (purpose) of a surface. More...
 
MirSurfaceType mir_surface_get_type (MirSurface *surf)
 Get the type (purpose) of a surface. More...
 
MirWaitHandlemir_surface_set_state (MirSurface *surf, MirSurfaceState state)
 Change the state of a surface. More...
 
MirSurfaceState mir_surface_get_state (MirSurface *surf)
 Get the current state of a surface. More...
 
MirWaitHandlemir_surface_set_swapinterval (MirSurface *surf, int interval)
 Set the swapinterval for mir_surface_swap_buffers. More...
 
int mir_surface_get_swapinterval (MirSurface *surf)
 Query the swapinterval that the surface is operating with. More...
 
void mir_connection_set_lifecycle_event_callback (MirConnection *connection, mir_lifecycle_event_callback callback, void *context)
 Register a callback to be called when a Lifecycle state change occurs. More...
 
void mir_connection_set_display_config_change_callback (MirConnection *connection, mir_display_config_callback callback, void *context)
 Register a callback to be called when the hardware display configuration changes. More...
 
MirWaitHandlemir_connection_apply_display_config (MirConnection *connection, MirDisplayConfiguration *display_configuration)
 Apply the display configuration. More...
 
MirWaitHandlemir_connection_drm_auth_magic (MirConnection *connection, unsigned int magic, mir_drm_auth_magic_callback callback, void *context)
 
int mir_connection_drm_set_gbm_device (MirConnection *connection, struct gbm_device *gbm_dev)
 Set the gbm_device to be used by the EGL implementation. More...
 

Variables

mir_connect_impl_func mir_connect_impl = mir_default_connect
 
mir_connection_release_impl_func mir_connection_release_impl = mir_default_connection_release
 

Function Documentation

void mir_connection_get_display_info ( MirConnection connection,
MirDisplayInfo display_info 
)
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).

Parameters
[in]surfaceThe surface
Returns
An internal ID that identifies the surface
MirWaitHandle* mir_default_connect ( char const *  socket_file,
char const *  name,
mir_connected_callback  callback,
void *  context 
)
void mir_default_connection_release ( MirConnection connection)
int mir_surface_get_id ( MirSurface surface)

Variable Documentation


Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Apr 11 21:14:53 UTC 2014