Mir
basic.c: A simple mir client

demo_client shows the use of mir API. This program opens a mir connection and creates a surface.

demo_client()

Opens a mir connection and creates a surface and advances the current buffer before closing the surface and connection.

request and wait for connection handle

mcd.connection = mir_connect_sync(server, __FILE__);
puts("Connected");

request and wait for surface handle

// ...we create a surface using that format.
mcd.window = mir_create_window_sync(spec);
puts("Window created");

exchange the current buffer for a new one

We release our surface

// We should release our surface
puts("Window released");

We release our connection

// We should release our connection
mir_connection_release(mcd.connection);
puts("Connection released");

the raw, platform-specific buffer handle for the current buffer

MirNativeBuffer* buffer_package = NULL;
assert(buffer_package != NULL);
MirGraphicsRegion graphics_region;

Copyright © 2012-2016 Canonical Ltd.
Generated on Mon Jun 5 13:49:26 UTC 2017