Mir
eglapp.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2013 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 3 as
6  * 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 General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Author: Daniel van Vugt <daniel.van.vugt@canonical.com>
17  */
18 
19 #ifndef __EGLAPP_H__
20 #define __EGLAPP_H__
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 struct MirConnection;
27 struct MirSurface;
28 struct MirEvent;
29 
30 typedef int mir_eglapp_bool;
31 
33 {
34  char const* syntax;
35  char const* format; /* "%" scanf format or "!"=flag, "$"=--, "="=copy */
36  void* variable;
37  char const* description;
38 };
39 
41 
42 mir_eglapp_bool mir_eglapp_init(int argc, char* argv[],
43  unsigned int* width, unsigned int* height,
44  struct mir_eglapp_arg const* custom_args);
45 void mir_eglapp_swap_buffers(void);
46 void mir_eglapp_quit(void);
47 mir_eglapp_bool mir_eglapp_running(void);
48 void mir_eglapp_cleanup(void);
49 void mir_eglapp_handle_event(struct MirSurface* surface, struct MirEvent const* ev, void* unused);
50 double mir_eglapp_display_hz(void);
51 
54 #ifdef __cplusplus
55 }
56 #endif
57 
58 #endif
int mir_eglapp_bool
Definition: eglapp.h:28
double mir_eglapp_display_hz(void)
Definition: eglapp.c:149
mir_eglapp_bool mir_eglapp_init(int argc, char *argv[], unsigned int *width, unsigned int *height, struct mir_eglapp_arg const *custom_args)
Definition: eglapp.c:323
unsigned int height
Definition: mir_image.h:27
float mir_eglapp_background_opacity
Definition: eglapp.c:31
unsigned int width
Definition: mir_image.h:26
void mir_eglapp_handle_event(struct MirSurface *surface, struct MirEvent const *ev, void *unused)
struct MirSurface MirSurface
Definition: client_types.h:41
struct MirConnection MirConnection
Definition: client_types.h:40
struct MirEvent MirEvent
Definition: event.h:67
Definition: eglapp.h:32
void mir_eglapp_cleanup(void)
Definition: eglapp.c:49
void mir_eglapp_quit(void)
Definition: eglapp.c:59
struct MirSurface * mir_eglapp_native_surface()
Definition: eglapp.c:522
char const * description
Definition: eglapp.h:37
char const * format
Definition: eglapp.h:35
void mir_eglapp_swap_buffers(void)
Definition: eglapp.c:78
char const * syntax
Definition: eglapp.h:34
struct MirConnection * mir_eglapp_native_connection()
Definition: eglapp.c:517
mir_eglapp_bool mir_eglapp_running(void)
Definition: eglapp.c:73
void * variable
Definition: eglapp.h:36

Copyright © 2012-2016 Canonical Ltd.
Generated on Sat Dec 3 12:48:59 UTC 2016