|
Packit Service |
f6fdc3 |
/*
|
|
Packit Service |
f6fdc3 |
* Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved.
|
|
Packit Service |
f6fdc3 |
*
|
|
Packit Service |
f6fdc3 |
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
Packit Service |
f6fdc3 |
* copy of this software and associated documentation files (the "Software"),
|
|
Packit Service |
f6fdc3 |
* to deal in the Software without restriction, including without limitation
|
|
Packit Service |
f6fdc3 |
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
Packit Service |
f6fdc3 |
* and/or sell copies of the Software, and to permit persons to whom the
|
|
Packit Service |
f6fdc3 |
* Software is furnished to do so, subject to the following conditions:
|
|
Packit Service |
f6fdc3 |
*
|
|
Packit Service |
f6fdc3 |
* The above copyright notice and this permission notice shall be included in
|
|
Packit Service |
f6fdc3 |
* all copies or substantial portions of the Software.
|
|
Packit Service |
f6fdc3 |
*
|
|
Packit Service |
f6fdc3 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
Packit Service |
f6fdc3 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
Packit Service |
f6fdc3 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
Packit Service |
f6fdc3 |
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
Packit Service |
f6fdc3 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
Packit Service |
f6fdc3 |
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
Packit Service |
f6fdc3 |
* DEALINGS IN THE SOFTWARE.
|
|
Packit Service |
f6fdc3 |
*/
|
|
Packit Service |
f6fdc3 |
|
|
Packit Service |
f6fdc3 |
#ifndef WAYLAND_EGLUTILS_H
|
|
Packit Service |
f6fdc3 |
#define WAYLAND_EGLUTILS_H
|
|
Packit Service |
f6fdc3 |
|
|
Packit Service |
f6fdc3 |
#include <EGL/egl.h>
|
|
Packit Service |
f6fdc3 |
#include <EGL/eglext.h>
|
|
Packit Service |
f6fdc3 |
#include "wayland-external-exports.h"
|
|
Packit Service |
f6fdc3 |
#include "wayland-eglhandle.h"
|
|
Packit Service |
f6fdc3 |
|
|
Packit Service |
f6fdc3 |
#ifdef NDEBUG
|
|
Packit Service |
f6fdc3 |
#define wlEglSetError(data, err) \
|
|
Packit Service |
f6fdc3 |
wlEglSetErrorCallback(data, err, 0, 0)
|
|
Packit Service |
f6fdc3 |
#else
|
|
Packit Service |
f6fdc3 |
#define wlEglSetError(data, err) \
|
|
Packit Service |
f6fdc3 |
wlEglSetErrorCallback(data, err, __FILE__, __LINE__)
|
|
Packit Service |
f6fdc3 |
#endif
|
|
Packit Service |
f6fdc3 |
|
|
Packit Service |
f6fdc3 |
#ifndef WL_LIST_INIT
|
|
Packit Service |
f6fdc3 |
#define WL_LIST_INIT(head) { .prev = (head), .next = (head) }
|
|
Packit Service |
f6fdc3 |
#endif
|
|
Packit Service |
f6fdc3 |
|
|
Packit Service |
f6fdc3 |
#if defined(__QNX__)
|
|
Packit Service |
f6fdc3 |
#define HAS_MINCORE 0
|
|
Packit Service |
f6fdc3 |
#else
|
|
Packit Service |
f6fdc3 |
#define HAS_MINCORE 1
|
|
Packit Service |
f6fdc3 |
#endif
|
|
Packit Service |
f6fdc3 |
|
|
Packit Service |
f6fdc3 |
#ifdef __cplusplus
|
|
Packit Service |
f6fdc3 |
extern "C" {
|
|
Packit Service |
f6fdc3 |
#endif
|
|
Packit Service |
f6fdc3 |
|
|
Packit Service |
f6fdc3 |
EGLBoolean wlEglFindExtension(const char *extension, const char *extensions);
|
|
Packit Service |
f6fdc3 |
#if HAS_MINCORE
|
|
Packit Service |
f6fdc3 |
EGLBoolean wlEglPointerIsDereferencable(void *p);
|
|
Packit Service |
f6fdc3 |
EGLBoolean wlEglCheckInterfaceType(struct wl_object *obj, const char *ifname);
|
|
Packit Service |
f6fdc3 |
#ifndef WL_CHECK_INTERFACE_TYPE
|
|
Packit Service |
f6fdc3 |
#define WL_CHECK_INTERFACE_TYPE(obj, ifname) \
|
|
Packit Service |
f6fdc3 |
(wlEglCheckInterfaceType((struct wl_object *)(obj), #ifname) || \
|
|
Packit Service |
f6fdc3 |
*(void **)(obj) == &ifname)
|
|
Packit Service |
f6fdc3 |
#endif
|
|
Packit Service |
f6fdc3 |
#endif
|
|
Packit Service |
f6fdc3 |
void wlEglSetErrorCallback(WlEglPlatformData *data,
|
|
Packit Service |
f6fdc3 |
EGLint err,
|
|
Packit Service |
f6fdc3 |
const char *file,
|
|
Packit Service |
f6fdc3 |
int line);
|
|
Packit Service |
f6fdc3 |
#ifdef __cplusplus
|
|
Packit Service |
f6fdc3 |
}
|
|
Packit Service |
f6fdc3 |
#endif
|
|
Packit Service |
f6fdc3 |
|
|
Packit Service |
f6fdc3 |
#endif
|