forked from bartvdbraak/blender
e955c94ed3
Listing the "Blender Foundation" as copyright holder implied the Blender Foundation holds copyright to files which may include work from many developers. While keeping copyright on headers makes sense for isolated libraries, Blender's own code may be refactored or moved between files in a way that makes the per file copyright holders less meaningful. Copyright references to the "Blender Foundation" have been replaced with "Blender Authors", with the exception of `./extern/` since these this contains libraries which are more isolated, any changed to license headers there can be handled on a case-by-case basis. Some directories in `./intern/` have also been excluded: - `./intern/cycles/` it's own `AUTHORS` file is planned. - `./intern/opensubdiv/`. An "AUTHORS" file has been added, using the chromium projects authors file as a template. Design task: #110784 Ref !110783.
71 lines
2.3 KiB
C
71 lines
2.3 KiB
C
/* SPDX-FileCopyrightText: 2022 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup intern_wayland_dynload
|
|
*
|
|
* Wrapper functions for `<wayland-egl.h>`.
|
|
*/
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#ifdef WAYLAND_DYNLOAD_FN
|
|
WAYLAND_DYNLOAD_FN(wl_egl_window_create)
|
|
WAYLAND_DYNLOAD_FN(wl_egl_window_destroy)
|
|
WAYLAND_DYNLOAD_FN(wl_egl_window_resize)
|
|
WAYLAND_DYNLOAD_FN(wl_egl_window_get_attached_size)
|
|
#elif defined(WAYLAND_DYNLOAD_IFACE)
|
|
/* No interfaces. */
|
|
#else
|
|
|
|
/* Header guard. */
|
|
# if !defined(__WAYLAND_DYNLOAD_EGL_H__) && !defined(WAYLAND_DYNLOAD_VALIDATE)
|
|
# define __WAYLAND_DYNLOAD_EGL_H__
|
|
|
|
# include <wayland-egl-core.h>
|
|
extern struct WaylandDynload_EGL wayland_dynload_egl;
|
|
|
|
/* Support validating declarations against the header. */
|
|
# ifndef WAYLAND_DYNLOAD_VALIDATE
|
|
# define WL_DYN_FN(a) (*a)
|
|
# else
|
|
# define WL_DYN_FN(a) (a)
|
|
# endif
|
|
|
|
# ifndef WAYLAND_DYNLOAD_VALIDATE
|
|
struct WaylandDynload_EGL {
|
|
# endif
|
|
|
|
struct wl_egl_window *WL_DYN_FN(wl_egl_window_create)(struct wl_surface *surface,
|
|
int width,
|
|
int height);
|
|
void WL_DYN_FN(wl_egl_window_destroy)(struct wl_egl_window *egl_window);
|
|
void WL_DYN_FN(wl_egl_window_resize)(
|
|
struct wl_egl_window *egl_window, int width, int height, int dx, int dy);
|
|
void WL_DYN_FN(wl_egl_window_get_attached_size)(struct wl_egl_window *egl_window,
|
|
int *width,
|
|
int *height);
|
|
|
|
# ifndef WAYLAND_DYNLOAD_VALIDATE
|
|
};
|
|
# endif
|
|
# undef WL_DYN_FN
|
|
|
|
# ifndef WAYLAND_DYNLOAD_VALIDATE
|
|
# define wl_egl_window_create(...) (*wayland_dynload_egl.wl_egl_window_create)(__VA_ARGS__)
|
|
# define wl_egl_window_destroy(...) (*wayland_dynload_egl.wl_egl_window_destroy)(__VA_ARGS__)
|
|
# define wl_egl_window_resize(...) (*wayland_dynload_egl.wl_egl_window_resize)(__VA_ARGS__)
|
|
# define wl_egl_window_get_attached_size(...) \
|
|
(*wayland_dynload_egl.wl_egl_window_get_attached_size)(__VA_ARGS__)
|
|
|
|
# endif /* !WAYLAND_DYNLOAD_VALIDATE */
|
|
# endif /* !defined(WAYLAND_DYNLOAD_FN) && !defined(WAYLAND_DYNLOAD_IFACE) */
|
|
#endif /* !defined(__WAYLAND_DYNLOAD_EGL_H__) && !defined(WAYLAND_DYNLOAD_VALIDATE) */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|