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 
27 
28 typedef int mir_eglapp_bool;
29 
31 {
32  char const* syntax;
33  char const* format; /* "%" scanf format or "!"=flag, "$"=--, "="=copy */
34  void* variable;
35  char const* description;
36 };
37 
39 
40 mir_eglapp_bool mir_eglapp_init(int argc, char* argv[],
41  unsigned int* width, unsigned int* height,
42  struct mir_eglapp_arg const* custom_args);
43 void mir_eglapp_swap_buffers(void);
44 void mir_eglapp_quit(void);
45 mir_eglapp_bool mir_eglapp_running(void);
46 void mir_eglapp_cleanup(void);
47 void mir_eglapp_handle_event(MirWindow* window, MirEvent const* ev, void* unused);
48 double mir_eglapp_display_hz(void);
49 
52 #ifdef __cplusplus
53 }
54 #endif
55 
56 #endif
struct MirSurface MirWindow
Definition: client_types.h:43
int mir_eglapp_bool
Definition: eglapp.h:28
double mir_eglapp_display_hz(void)
Definition: eglapp.c:149
MirWindow * mir_eglapp_native_window()
Definition: eglapp.c:530
void mir_eglapp_handle_event(MirWindow *window, MirEvent const *ev, void *unused)
Definition: eglapp.c:154
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:318
unsigned int height
Definition: mir_image.h:27
float mir_eglapp_background_opacity
Definition: eglapp.c:31
MirConnection * mir_eglapp_native_connection()
Definition: eglapp.c:525
unsigned int width
Definition: mir_image.h:26
struct MirConnection MirConnection
Definition: client_types.h:41
struct MirEvent MirEvent
Definition: event.h:84
Definition: eglapp.h:30
void mir_eglapp_cleanup(void)
Definition: eglapp.c:49
void mir_eglapp_quit(void)
Definition: eglapp.c:59
char const * description
Definition: eglapp.h:35
char const * format
Definition: eglapp.h:33
void mir_eglapp_swap_buffers(void)
Definition: eglapp.c:78
char const * syntax
Definition: eglapp.h:32
mir_eglapp_bool mir_eglapp_running(void)
Definition: eglapp.c:73
void * variable
Definition: eglapp.h:34

Copyright © 2012-2016 Canonical Ltd.
Generated on Tue Oct 31 05:57:28 UTC 2017