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
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31struct ANativeWindow;
32struct ANativeWindowBuffer;
33typedef void* (*mir_extension_to_native_display_type)(MirConnection*);
34#pragma GCC diagnostic push
35#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
36typedef struct ANativeWindow* (*mir_extension_create_anw)(
38 int width, int height,
39 unsigned int hal_pixel_format,
40 unsigned int gralloc_usage_flags);
41#pragma GCC diagnostic pop
42typedef void (*mir_extension_destroy_anw)(struct ANativeWindow*);
43typedef struct ANativeWindowBuffer* (*mir_extension_create_anwb)(MirBuffer*);
44typedef void (*mir_extension_destroy_anwb)(struct ANativeWindowBuffer*);
45
47{
54
55static 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_ */
void(* mir_extension_destroy_anw)(struct ANativeWindow *)
Definition: android_egl.h:42
struct ANativeWindowBuffer *(* mir_extension_create_anwb)(MirBuffer *)
Definition: android_egl.h:43
void(* mir_extension_destroy_anwb)(struct ANativeWindowBuffer *)
Definition: android_egl.h:44
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
struct MirExtensionAndroidEGLV1 MirExtensionAndroidEGLV1
void *(* mir_extension_to_native_display_type)(MirConnection *)
Definition: android_egl.h:33
int width
Definition: client_types.h:1
int height
Definition: client_types.h:2
struct MirBuffer MirBuffer
Definition: client_types.h:56
struct MirRenderSurface MirRenderSurface
Definition: client_types.h:57
struct MirConnection MirConnection
Definition: client_types.h:41
void const * mir_connection_request_extension(MirConnection *connection, char const *interface, int version)
Request a Mir extension.
Definition: android_egl.h:47
mir_extension_create_anwb create_buffer
Definition: android_egl.h:51
mir_extension_create_anw create_window
Definition: android_egl.h:49
mir_extension_destroy_anw destroy_window
Definition: android_egl.h:50
mir_extension_destroy_anwb destroy_buffer
Definition: android_egl.h:52
mir_extension_to_native_display_type to_display
Definition: android_egl.h:48

Copyright © 2012-2022 Canonical Ltd.
Generated on Sun Oct 9 06:13:38 UTC 2022
This documentation is licensed under the GPL version 2 or 3.