Wise&mystical  1.0
Project about Europe
Loading...
Searching...
No Matches
glfw3native.h
Go to the documentation of this file.
1
29#ifndef _glfw3_native_h_
30#define _glfw3_native_h_
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36
37
80
84#if defined(GLFW_EXPOSE_NATIVE_WIN32) || defined(GLFW_EXPOSE_NATIVE_WGL)
85 // This is a workaround for the fact that glfw3.h needs to export APIENTRY (for
86 // example to allow applications to correctly declare a GL_KHR_debug callback)
87 // but windows.h assumes no one will define APIENTRY before it does
88 #if defined(GLFW_APIENTRY_DEFINED)
89 #undef APIENTRY
90 #undef GLFW_APIENTRY_DEFINED
91 #endif
92// @raysan5: Actually, only HWND handler needs to be defined
93// Including windows.h could suppose symbols re-definition issues (i.e Rectangle type)
94//#include <windows.h>
95 typedef void *PVOID;
96 typedef PVOID HANDLE;
97 typedef HANDLE HWND;
98#elif defined(GLFW_EXPOSE_NATIVE_COCOA) || defined(GLFW_EXPOSE_NATIVE_NSGL)
99 #if defined(__OBJC__)
100 #import <Cocoa/Cocoa.h>
101 #else
102 #include <ApplicationServices/ApplicationServices.h>
103 typedef void* id;
104 #endif
105#elif defined(GLFW_EXPOSE_NATIVE_X11) || defined(GLFW_EXPOSE_NATIVE_GLX)
106 #include <X11/Xlib.h>
107 #include <X11/extensions/Xrandr.h>
108#elif defined(GLFW_EXPOSE_NATIVE_WAYLAND)
109 #include <wayland-client.h>
110#endif
111
112#if defined(GLFW_EXPOSE_NATIVE_WGL)
113 /* WGL is declared by windows.h */
114#endif
115#if defined(GLFW_EXPOSE_NATIVE_NSGL)
116 /* NSGL is declared by Cocoa.h */
117#endif
118#if defined(GLFW_EXPOSE_NATIVE_GLX)
119 #include <GL/glx.h>
120#endif
121#if defined(GLFW_EXPOSE_NATIVE_EGL)
122 #include <EGL/egl.h>
123#endif
124#if defined(GLFW_EXPOSE_NATIVE_OSMESA)
125 #include <GL/osmesa.h>
126#endif
127
128
129
133#if defined(GLFW_EXPOSE_NATIVE_WIN32)
147GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* monitor);
148
162GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* monitor);
163
177#endif
178
179#if defined(GLFW_EXPOSE_NATIVE_WGL)
193#endif
194
195#if defined(GLFW_EXPOSE_NATIVE_COCOA)
208GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);
209
223#endif
224
225#if defined(GLFW_EXPOSE_NATIVE_NSGL)
239#endif
240
241#if defined(GLFW_EXPOSE_NATIVE_X11)
254GLFWAPI Display* glfwGetX11Display(void);
255
268GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor);
269
282GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* monitor);
283
296GLFWAPI Window glfwGetX11Window(GLFWwindow* window);
297
318GLFWAPI void glfwSetX11SelectionString(const char* string);
319
346GLFWAPI const char* glfwGetX11SelectionString(void);
347#endif
348
349#if defined(GLFW_EXPOSE_NATIVE_GLX)
363
377#endif
378
379#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
392GLFWAPI struct wl_display* glfwGetWaylandDisplay(void);
393
406GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor);
407
420GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window);
421#endif
422
423#if defined(GLFW_EXPOSE_NATIVE_EGL)
437
451
465#endif
466
467#if defined(GLFW_EXPOSE_NATIVE_OSMESA)
487GLFWAPI int glfwGetOSMesaColorBuffer(GLFWwindow* window, int* width, int* height, int* format, void** buffer);
488
508GLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* window, int* width, int* height, int* bytesPerValue, void** buffer);
509
523#endif
524
525#ifdef __cplusplus
526}
527#endif
528
529#endif /* _glfw3_native_h_ */
530
GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor *handle)
void * id
GLFWAPI id glfwGetCocoaWindow(GLFWwindow *handle)
GLFWAPI EGLDisplay glfwGetEGLDisplay(void)
Definition: egl_context.c:813
GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow *handle)
Definition: egl_context.c:833
GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow *handle)
Definition: egl_context.c:819
void * EGLSurface
Definition: egl_context.h:113
void * EGLContext
Definition: egl_context.h:111
void * EGLDisplay
Definition: egl_context.h:112
#define GLFWAPI
Definition: glfw3.h:269
GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow *handle)
Definition: glx_context.c:672
GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow *handle)
Definition: glx_context.c:686
struct __GLXcontext * GLXContext
Definition: glx_context.h:72
XID GLXWindow
Definition: glx_context.h:69
struct GLFWmonitor GLFWmonitor
Opaque monitor object.
Definition: glfw3.h:1307
struct GLFWwindow GLFWwindow
Opaque window object.
Definition: glfw3.h:1319
GLFWAPI id glfwGetNSGLContext(GLFWwindow *handle)
Definition: nsgl_context.m:356
GLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow *handle, int *width, int *height, int *bytesPerValue, void **buffer)
GLFWAPI int glfwGetOSMesaColorBuffer(GLFWwindow *handle, int *width, int *height, int *format, void **buffer)
GLFWAPI OSMesaContext glfwGetOSMesaContext(GLFWwindow *handle)
void * OSMesaContext
GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow *handle)
Definition: wgl_context.c:785
GLFWAPI const char * glfwGetWin32Adapter(GLFWmonitor *handle)
GLFWAPI const char * glfwGetWin32Monitor(GLFWmonitor *handle)
GLFWAPI HWND glfwGetWin32Window(GLFWwindow *handle)
GLFWAPI struct wl_output * glfwGetWaylandMonitor(GLFWmonitor *handle)
Definition: wl_monitor.c:225
GLFWAPI struct wl_surface * glfwGetWaylandWindow(GLFWwindow *handle)
Definition: wl_window.c:1808
GLFWAPI struct wl_display * glfwGetWaylandDisplay(void)
Definition: wl_window.c:1802
GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor *handle)
Definition: x11_monitor.c:601
GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor *handle)
Definition: x11_monitor.c:608
GLFWAPI Display * glfwGetX11Display(void)
Definition: x11_window.c:3272
GLFWAPI void glfwSetX11SelectionString(const char *string)
Definition: x11_window.c:3285
GLFWAPI Window glfwGetX11Window(GLFWwindow *handle)
Definition: x11_window.c:3278
GLFWAPI const char * glfwGetX11SelectionString(void)
Definition: x11_window.c:3305