Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
mir_client_library.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012-2013 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License version 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  */
17 
18 #ifndef MIR_CLIENT_LIBRARY_H
19 #define MIR_CLIENT_LIBRARY_H
20 
23 #include <mir_toolkit/common.h>
24 
25 #ifdef __cplusplus
26 
30 extern "C" {
31 #endif
32 
33 /* This header defines the Mir client library's C API. */
34 
52  char const *server,
53  char const *app_name,
54  mir_connected_callback callback,
55  void *context);
56 
64 MirConnection *mir_connect_sync(char const *server, char const *app_name);
65 
72 int mir_connection_is_valid(MirConnection *connection);
73 
82 char const *mir_connection_get_error_message(MirConnection *connection);
83 
88 void mir_connection_release(MirConnection *connection);
89 
96 void mir_connection_get_platform(MirConnection *connection, MirPlatformPackage *platform_package);
97 
105  mir_lifecycle_event_callback callback, void* context);
106 
110 __attribute__((__deprecated__("Use mir_connection_create_display_config()")))
112 
121 
133  MirConnection* connection,
134  mir_display_config_callback callback, void* context);
135 
140 void mir_display_config_destroy(MirDisplayConfiguration* display_configuration);
141 
156 
163 
172  MirConnection* connection, MirPixelFormat* formats,
173  unsigned const int format_size, unsigned int *num_valid_formats);
174 
191  MirConnection *connection,
192  MirSurfaceParameters const *surface_parameters,
193  mir_surface_callback callback,
194  void *context);
195 
204  MirConnection *connection,
205  MirSurfaceParameters const *params);
206 
218  MirEventDelegate const *event_handler);
219 
226 
233 int mir_surface_is_valid(MirSurface *surface);
234 
244 char const *mir_surface_get_error_message(MirSurface *surface);
245 
253 
262 
269 void mir_surface_get_current_buffer(MirSurface *surface, MirNativeBuffer **buffer_package);
270 
279  MirSurface *surface,
280  MirGraphicsRegion *graphics_region);
281 
296  MirSurface *surface,
297  mir_surface_callback callback,
298  void *context);
299 
306 
320  MirSurface *surface,
321  mir_surface_callback callback,
322  void *context);
323 
329 void mir_surface_release_sync(MirSurface *surface);
330 
336 void mir_wait_for(MirWaitHandle *wait_handle);
337 
345 void mir_wait_for_one(MirWaitHandle *wait_handle);
346 
350 __attribute__((__deprecated__("Use mir_debug_surface_id()")))
351 int mir_surface_get_id(MirSurface *surface);
352 
362 
369 
377  MirSurfaceState state);
378 
385 
396 MirWaitHandle* mir_surface_set_swapinterval(MirSurface* surface, int interval);
397 
406 
407 #ifdef __cplusplus
408 }
410 #endif
411 
412 #endif /* MIR_CLIENT_LIBRARY_H */

Copyright © 2012,2013 Canonical Ltd.
Generated on Tue Oct 15 00:23:28 UTC 2013