glfw3native.h
Go to the documentation of this file.
1 /*************************************************************************
2  * GLFW 3.3 - www.glfw.org
3  * A library for OpenGL, window and input
4  *------------------------------------------------------------------------
5  * Copyright (c) 2002-2006 Marcus Geelnard
6  * Copyright (c) 2006-2016 Camilla Löwy <elmindreda@glfw.org>
7  *
8  * This software is provided 'as-is', without any express or implied
9  * warranty. In no event will the authors be held liable for any damages
10  * arising from the use of this software.
11  *
12  * Permission is granted to anyone to use this software for any purpose,
13  * including commercial applications, and to alter it and redistribute it
14  * freely, subject to the following restrictions:
15  *
16  * 1. The origin of this software must not be misrepresented; you must not
17  * claim that you wrote the original software. If you use this software
18  * in a product, an acknowledgment in the product documentation would
19  * be appreciated but is not required.
20  *
21  * 2. Altered source versions must be plainly marked as such, and must not
22  * be misrepresented as being the original software.
23  *
24  * 3. This notice may not be removed or altered from any source
25  * distribution.
26  *
27  *************************************************************************/
28 
29 #ifndef _glfw3_native_h_
30 #define _glfw3_native_h_
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 
37 /*************************************************************************
38  * Doxygen documentation
39  *************************************************************************/
40 
80 /*************************************************************************
81  * System headers and types
82  *************************************************************************/
83 
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_ARB_debug_output
87  // callback) 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  #include <windows.h>
93 #elif defined(GLFW_EXPOSE_NATIVE_COCOA) || defined(GLFW_EXPOSE_NATIVE_NSGL)
94  #if defined(__OBJC__)
95  #import <Cocoa/Cocoa.h>
96  #else
97  #include <ApplicationServices/ApplicationServices.h>
98  typedef void* id;
99  #endif
100 #elif defined(GLFW_EXPOSE_NATIVE_X11) || defined(GLFW_EXPOSE_NATIVE_GLX)
101  #include <X11/Xlib.h>
102  #include <X11/extensions/Xrandr.h>
103 #elif defined(GLFW_EXPOSE_NATIVE_WAYLAND)
104  #include <wayland-client.h>
105 #endif
106 
107 #if defined(GLFW_EXPOSE_NATIVE_WGL)
108  /* WGL is declared by windows.h */
109 #endif
110 #if defined(GLFW_EXPOSE_NATIVE_NSGL)
111  /* NSGL is declared by Cocoa.h */
112 #endif
113 #if defined(GLFW_EXPOSE_NATIVE_GLX)
114  #include <GL/glx.h>
115 #endif
116 #if defined(GLFW_EXPOSE_NATIVE_EGL)
117  #include <EGL/egl.h>
118 #endif
119 #if defined(GLFW_EXPOSE_NATIVE_OSMESA)
120  #include <GL/osmesa.h>
121 #endif
122 
123 
124 /*************************************************************************
125  * Functions
126  *************************************************************************/
127 
128 #if defined(GLFW_EXPOSE_NATIVE_WIN32)
129 
142 GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* monitor);
143 
157 GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* monitor);
158 
172 #endif
173 
174 #if defined(GLFW_EXPOSE_NATIVE_WGL)
175 
188 #endif
189 
190 #if defined(GLFW_EXPOSE_NATIVE_COCOA)
191 
203 GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);
204 
217 GLFWAPI id glfwGetCocoaWindow(GLFWwindow* window);
218 #endif
219 
220 #if defined(GLFW_EXPOSE_NATIVE_NSGL)
221 
233 GLFWAPI id glfwGetNSGLContext(GLFWwindow* window);
234 #endif
235 
236 #if defined(GLFW_EXPOSE_NATIVE_X11)
237 
249 GLFWAPI Display* glfwGetX11Display(void);
250 
263 GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor);
264 
277 GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* monitor);
278 
292 
313 GLFWAPI void glfwSetX11SelectionString(const char* string);
314 
341 GLFWAPI const char* glfwGetX11SelectionString(void);
342 #endif
343 
344 #if defined(GLFW_EXPOSE_NATIVE_GLX)
345 
358 
372 #endif
373 
374 #if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
375 
387 GLFWAPI struct wl_display* glfwGetWaylandDisplay(void);
388 
401 GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor);
402 
415 GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window);
416 #endif
417 
418 #if defined(GLFW_EXPOSE_NATIVE_EGL)
419 
432 
446 
460 #endif
461 
462 #if defined(GLFW_EXPOSE_NATIVE_OSMESA)
463 
483 
503 GLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* window, int* width, int* height, int* bytesPerValue, void** buffer);
504 
518 #endif
519 
520 #ifdef __cplusplus
521 }
522 #endif
523 
524 #endif /* _glfw3_native_h_ */
525 
GLFWAPI struct wl_surface * glfwGetWaylandWindow(GLFWwindow *handle)
Definition: wl_window.c:1851
#define GLFWAPI
Definition: glfw3.h:240
GLFWAPI struct wl_display * glfwGetWaylandDisplay(void)
Definition: wl_window.c:1845
GLFWAPI void glfwSetX11SelectionString(const char *string)
Definition: x11_window.c:3037
GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow *handle)
Definition: glx_context.c:671
struct GLFWmonitor GLFWmonitor
GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow *handle)
Definition: wgl_context.c:719
void * OSMesaContext
GLFWAPI int glfwGetOSMesaColorBuffer(GLFWwindow *handle, int *width, int *height, int *format, void **buffer)
XID GLXWindow
Definition: glx_context.h:69
GLenum GLfloat * buffer
struct __GLXcontext * GLXContext
Definition: glx_context.h:72
GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow *handle)
Definition: egl_context.c:759
GLenum GLuint id
GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor *handle)
Definition: x11_monitor.c:491
void * EGLContext
Definition: egl_context.h:114
GLFWAPI EGLDisplay glfwGetEGLDisplay(void)
Definition: egl_context.c:753
GLFWAPI struct wl_output * glfwGetWaylandMonitor(GLFWmonitor *handle)
Definition: wl_monitor.c:203
GLint GLsizei GLsizei height
GLint GLint GLsizei GLint GLenum format
GLFWAPI const char * glfwGetX11SelectionString(void)
Definition: x11_window.c:3057
GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor *handle)
Definition: x11_monitor.c:498
GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow *handle)
Definition: egl_context.c:773
GLFWAPI const char * glfwGetWin32Monitor(GLFWmonitor *handle)
GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow *handle)
Definition: glx_context.c:685
GLFWAPI const char * glfwGetWin32Adapter(GLFWmonitor *handle)
GLFWAPI Display * glfwGetX11Display(void)
Definition: x11_window.c:3024
GLFWAPI Window glfwGetX11Window(GLFWwindow *handle)
Definition: x11_window.c:3030
GLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow *handle, int *width, int *height, int *bytesPerValue, void **buffer)
GLFWAPI OSMesaContext glfwGetOSMesaContext(GLFWwindow *handle)
void * EGLDisplay
Definition: egl_context.h:115
struct GLFWwindow GLFWwindow
GLint GLsizei width
GLFWAPI HWND glfwGetWin32Window(GLFWwindow *handle)
void * EGLSurface
Definition: egl_context.h:116


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:16