Mir
android_egl.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2016 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License version 2 or 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 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  * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
17  */
18 
19 #ifndef MIR_CLIENT_EXTENSIONS_ANDROID_EGL_H_
20 #define MIR_CLIENT_EXTENSIONS_ANDROID_EGL_H_
21 
24 #include "mir_toolkit/mir_buffer.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 struct ANativeWindow;
32 struct ANativeWindowBuffer;
33 typedef void* (*mir_extension_to_native_display_type)(MirConnection*);
34 #pragma GCC diagnostic push
35 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
36 typedef struct ANativeWindow* (*mir_extension_create_anw)(
37  MirRenderSurface* rs,
38  int width, int height,
39  unsigned int hal_pixel_format,
40  unsigned int gralloc_usage_flags);
41 #pragma GCC diagnostic pop
42 typedef void (*mir_extension_destroy_anw)(struct ANativeWindow*);
43 typedef struct ANativeWindowBuffer* (*mir_extension_create_anwb)(MirBuffer*);
44 typedef void (*mir_extension_destroy_anwb)(struct ANativeWindowBuffer*);
45 
47 {
54 
55 static inline MirExtensionAndroidEGLV1 const* mir_extension_android_egl_v1(
56  MirConnection* connection)
57 {
59  connection, "mir_extension_android_egl", 1);
60 }
61 
62 #ifdef __cplusplus
63 }
64 #endif
65 #endif /* MIR_CLIENT_EXTENSIONS_ANDROID_EGL_H_ */
mir_extension_create_anw
struct ANativeWindow *(* mir_extension_create_anw)(MirRenderSurface *rs, int width, int height, unsigned int hal_pixel_format, unsigned int gralloc_usage_flags)
Definition: android_egl.h:36
mir_connection.h
MirExtensionAndroidEGLV1
struct MirExtensionAndroidEGLV1 MirExtensionAndroidEGLV1
mir_connection_request_extension
void const * mir_connection_request_extension(MirConnection *connection, char const *interface, int version)
Request a Mir extension.
MirExtensionAndroidEGLV1::destroy_window
mir_extension_destroy_anw destroy_window
Definition: android_egl.h:50
mir_extension_to_native_display_type
void *(* mir_extension_to_native_display_type)(MirConnection *)
Definition: android_egl.h:33
MirBuffer
struct MirBuffer MirBuffer
Definition: client_types.h:56
MirExtensionAndroidEGLV1::create_window
mir_extension_create_anw create_window
Definition: android_egl.h:49
MirConnection
struct MirConnection MirConnection
Definition: client_types.h:41
height
int height
Definition: client_types.h:179
mir_buffer.h
MirExtensionAndroidEGLV1::to_display
mir_extension_to_native_display_type to_display
Definition: android_egl.h:48
MirExtensionAndroidEGLV1::create_buffer
mir_extension_create_anwb create_buffer
Definition: android_egl.h:51
MirRenderSurface
struct MirRenderSurface MirRenderSurface
Definition: client_types.h:57
mir_extension_destroy_anwb
void(* mir_extension_destroy_anwb)(struct ANativeWindowBuffer *)
Definition: android_egl.h:44
mir_extension_core.h
mir_render_surface.h
mir_extension_destroy_anw
void(* mir_extension_destroy_anw)(struct ANativeWindow *)
Definition: android_egl.h:42
MirExtensionAndroidEGLV1::destroy_buffer
mir_extension_destroy_anwb destroy_buffer
Definition: android_egl.h:52
MirExtensionAndroidEGLV1
Definition: android_egl.h:46
mir_extension_create_anwb
struct ANativeWindowBuffer *(* mir_extension_create_anwb)(MirBuffer *)
Definition: android_egl.h:43
width
int width
Definition: client_types.h:178

Copyright © 2012-2020 Canonical Ltd.
Generated on Fri Apr 10 09:30:49 UTC 2020
This documentation is licensed under the GPL version 2 or 3.