egl: Add needed extern "C" for C++ access
* Haiku's egl driver is C++ due to the interface natively being C++ Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
@@ -31,6 +31,11 @@
|
||||
#ifndef EGLAPI_INCLUDED
|
||||
#define EGLAPI_INCLUDED
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* A generic function ptr type
|
||||
*/
|
||||
@@ -209,4 +214,9 @@ struct _egl_api
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EGLAPI_INCLUDED */
|
||||
|
@@ -34,6 +34,10 @@
|
||||
#include "egltypedefs.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef EGLBoolean (*_EGLArrayForEach)(void *elem, void *foreach_data);
|
||||
|
||||
|
||||
@@ -83,4 +87,8 @@ _eglGetArraySize(_EGLArray *array)
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EGLARRAY_INCLUDED */
|
||||
|
@@ -30,9 +30,17 @@
|
||||
#ifndef EGLCOMPILER_INCLUDED
|
||||
#define EGLCOMPILER_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define STATIC_ASSERT(COND) \
|
||||
do { \
|
||||
(void) sizeof(char [1 - 2*!(COND)]); \
|
||||
} while (0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EGLCOMPILER_INCLUDED */
|
||||
|
@@ -39,6 +39,10 @@
|
||||
#include "egltypedefs.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* update _eglValidationTable and _eglOffsetOfConfig before updating this
|
||||
* struct */
|
||||
struct _egl_config
|
||||
@@ -225,4 +229,8 @@ extern EGLBoolean
|
||||
_eglGetConfigs(_EGLDriver *drv, _EGLDisplay *dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EGLCONFIG_INCLUDED */
|
||||
|
@@ -37,6 +37,10 @@
|
||||
#include "egldisplay.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* "Base" class for device driver contexts.
|
||||
*/
|
||||
@@ -150,4 +154,8 @@ _eglGetContextHandle(_EGLContext *ctx)
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EGLCONTEXT_INCLUDED */
|
||||
|
@@ -34,6 +34,10 @@
|
||||
#include "egltypedefs.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define _EGL_API_ALL_BITS \
|
||||
(EGL_OPENGL_ES_BIT | \
|
||||
EGL_OPENVG_BIT | \
|
||||
@@ -115,4 +119,8 @@ extern EGLBoolean
|
||||
_eglError(EGLint errCode, const char *msg);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EGLCURRENT_INCLUDED */
|
||||
|
@@ -34,6 +34,9 @@
|
||||
#ifndef EGLDEFINES_INCLUDED
|
||||
#define EGLDEFINES_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define _EGL_MAX_EXTENSIONS_LEN 1000
|
||||
|
||||
@@ -41,5 +44,8 @@
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EGLDEFINES_INCLUDED */
|
||||
|
@@ -39,6 +39,10 @@
|
||||
#include "eglarray.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum _egl_platform_type {
|
||||
_EGL_PLATFORM_WINDOWS,
|
||||
_EGL_PLATFORM_X11,
|
||||
@@ -270,4 +274,9 @@ _eglGetWaylandDisplay(struct wl_display *native_display,
|
||||
const EGLint *attrib_list);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EGLDISPLAY_INCLUDED */
|
||||
|
@@ -38,6 +38,11 @@
|
||||
#include "eglapi.h"
|
||||
#include <stddef.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Define an inline driver typecast function.
|
||||
*
|
||||
@@ -124,4 +129,9 @@ _eglSearchPathForEach(EGLBoolean (*callback)(const char *, size_t, void *),
|
||||
void *callback_data);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* EGLDRIVER_INCLUDED */
|
||||
|
@@ -35,6 +35,11 @@
|
||||
#include "egltypedefs.h"
|
||||
#include "egldisplay.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _egl_image_attrib_int
|
||||
{
|
||||
EGLint Value;
|
||||
@@ -161,4 +166,8 @@ _eglGetImageHandle(_EGLImage *img)
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EGLIMAGE_INCLUDED */
|
||||
|
@@ -34,6 +34,10 @@
|
||||
#include "egltypedefs.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define _EGL_FATAL 0 /* unrecoverable error */
|
||||
#define _EGL_WARNING 1 /* recoverable error/problem */
|
||||
#define _EGL_INFO 2 /* just useful info */
|
||||
@@ -55,4 +59,8 @@ extern void
|
||||
_eglLog(EGLint level, const char *fmtStr, ...);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EGLLOG_INCLUDED */
|
||||
|
@@ -37,6 +37,10 @@
|
||||
#include "egldisplay.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* "Base" class for device driver surfaces.
|
||||
*/
|
||||
@@ -174,4 +178,8 @@ _eglGetSurfaceHandle(_EGLSurface *surf)
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EGLSURFACE_INCLUDED */
|
||||
|
@@ -38,6 +38,11 @@
|
||||
|
||||
#include "eglcompiler.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _egl_api _EGLAPI;
|
||||
|
||||
typedef struct _egl_array _EGLArray;
|
||||
@@ -68,4 +73,9 @@ typedef struct _egl_sync _EGLSync;
|
||||
|
||||
typedef struct _egl_thread_info _EGLThreadInfo;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EGLTYPEDEFS_INCLUDED */
|
||||
|
@@ -27,6 +27,10 @@
|
||||
#ifndef LOADER_H
|
||||
#define LOADER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Helpers to figure out driver and device name, eg. from pci-id, etc. */
|
||||
|
||||
#define _LOADER_DRI (1 << 0)
|
||||
@@ -61,4 +65,9 @@ loader_get_user_preferred_fd(int default_fd, int *different_device);
|
||||
void
|
||||
loader_set_logger(void (*logger)(int level, const char *fmt, ...));
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LOADER_H */
|
||||
|
Reference in New Issue
Block a user