Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
client_types.h
Go to the documentation of this file.
1 /*
2  * client_types.h: Type definitions used in client apps and libmirclient.
3  *
4  * Copyright © 2013 Canonical Ltd.
5  *
6  * This program is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU Lesser General Public License version 3,
8  * as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * Authored by: Robert Carr <robert.carr@canonical.com>
19  */
20 
21 #ifndef MIR_TOOLKIT_CLIENT_TYPES_H_
22 #define MIR_TOOLKIT_CLIENT_TYPES_H_
23 
24 #include <mir_toolkit/event.h>
25 #include <mir_toolkit/common.h>
26 
27 #include <stddef.h>
28 
29 #ifdef __cplusplus
30 
34 extern "C" {
35 #endif
36 
37 /* Display server connection API */
38 typedef void* MirEGLNativeWindowType;
41 typedef struct MirSurface MirSurface;
42 
49 
56 typedef void (*mir_connected_callback)(MirConnection *connection, void *client_context);
57 
67 typedef void (*mir_surface_callback)(MirSurface *surface, void *client_context);
68 
77  MirSurface* surface, MirEvent const* event, void* context);
78 
88  MirConnection* connection, MirLifecycleState state, void* context);
89 
97  MirConnection* connection, void* context);
98 
108 typedef enum MirPixelFormat
109 {
117 
123 typedef enum MirBufferUsage
124 {
128 
133 typedef struct MirSurfaceParameters
134 {
135  char const *name;
136  int width;
137  int height;
148  uint32_t output_id;
150 
152 
156 typedef enum MirPlatformType
157 {
161 
162 typedef struct MirPlatformPackage
163 {
165  int fd_items;
166 
170 
171 
176 typedef struct MirGraphicsRegion
177 {
178  int width;
179  int height;
180  int stride;
182  char *vaddr;
183 
185 
190 typedef struct MirDisplayInfo
191 {
192  uint32_t width;
193  uint32_t height;
194 
198 
203 typedef struct MirDisplayCard
204 {
205  uint32_t card_id;
208 
210 {
227 
228 typedef struct MirDisplayMode
229 {
232  double refresh_rate;
234 
236 
237 typedef struct MirDisplayOutput
238 {
239  uint32_t num_modes;
241  uint32_t preferred_mode;
242  uint32_t current_mode;
243 
247 
248  uint32_t card_id;
249  uint32_t output_id;
251 
252  int32_t position_x;
253  int32_t position_y;
254  uint32_t connected;
255  uint32_t used;
256 
259 
262 
264 {
265  uint32_t num_outputs;
267  uint32_t num_cards;
270 
275 typedef struct MirEventDelegate
276 {
278  void *context;
280 
281 #ifdef __cplusplus
282 }
284 #endif
285 
286 #endif /* MIR_TOOLKIT_CLIENT_TYPES_H_ */

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