1 /**********************************************************************************************
3 * rglfw - raylib GLFW single file compilation
5 * This file includes latest GLFW sources (https://github.com/glfw/glfw) to be compiled together
6 * with raylib for all supported platforms, this way, no external dependencies are required.
10 * Copyright (c) 2017-2021 Ramon Santamaria (@raysan5)
12 * This software is provided "as-is", without any express or implied warranty. In no event
13 * will the authors be held liable for any damages arising from the use of this software.
15 * Permission is granted to anyone to use this software for any purpose, including commercial
16 * applications, and to alter it and redistribute it freely, subject to the following restrictions:
18 * 1. The origin of this software must not be misrepresented; you must not claim that you
19 * wrote the original software. If you use this software in a product, an acknowledgment
20 * in the product documentation would be appreciated but is not required.
22 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
23 * as being the original software.
25 * 3. This notice may not be removed or altered from any source distribution.
27 **********************************************************************************************/
29 //#define _GLFW_BUILD_DLL // To build shared version
30 //http://www.glfw.org/docs/latest/compile.html#compile_manual
35 #if defined(__linux__)
36 #if !defined(_GLFW_WAYLAND) // Required for Wayland windowing
40 #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
43 #if defined(__APPLE__)
45 #define _GLFW_USE_MENUBAR // To create and populate the menu bar when the first window is created
46 #define _GLFW_USE_RETINA // To have windows use the full resolution of Retina displays
48 #if defined(__TINYC__)
49 #define _WIN32_WINNT_WINXP 0x0501
52 // NOTE: _GLFW_MIR experimental platform not supported at this moment
54 #include "external/glfw/src/context.c"
55 #include "external/glfw/src/init.c"
56 #include "external/glfw/src/input.c"
57 #include "external/glfw/src/monitor.c"
58 #include "external/glfw/src/vulkan.c"
59 #include "external/glfw/src/window.c"
62 #include "external/glfw/src/win32_init.c"
63 #include "external/glfw/src/win32_joystick.c"
64 #include "external/glfw/src/win32_monitor.c"
65 #include "external/glfw/src/win32_time.c"
66 #include "external/glfw/src/win32_thread.c"
67 #include "external/glfw/src/win32_window.c"
68 #include "external/glfw/src/wgl_context.c"
69 #include "external/glfw/src/egl_context.c"
70 #include "external/glfw/src/osmesa_context.c"
73 #if defined(__linux__)
74 #if defined(_GLFW_WAYLAND)
75 #include "external/glfw/src/wl_init.c"
76 #include "external/glfw/src/wl_monitor.c"
77 #include "external/glfw/src/wl_window.c"
78 #include "external/glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.c"
79 #include "external/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.c"
81 #if defined(_GLFW_X11)
82 #include "external/glfw/src/x11_init.c"
83 #include "external/glfw/src/x11_monitor.c"
84 #include "external/glfw/src/x11_window.c"
85 #include "external/glfw/src/glx_context.c"
88 #include "external/glfw/src/linux_joystick.c"
89 #include "external/glfw/src/posix_thread.c"
90 #include "external/glfw/src/posix_time.c"
91 #include "external/glfw/src/xkb_unicode.c"
92 #include "external/glfw/src/egl_context.c"
93 #include "external/glfw/src/osmesa_context.c"
96 #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__) || defined(__DragonFly__)
97 #include "external/glfw/src/x11_init.c"
98 #include "external/glfw/src/x11_monitor.c"
99 #include "external/glfw/src/x11_window.c"
100 #include "external/glfw/src/xkb_unicode.c"
101 // TODO: Joystick implementation
102 #include "external/glfw/src/null_joystick.c"
103 #include "external/glfw/src/posix_time.c"
104 #include "external/glfw/src/posix_thread.c"
105 #include "external/glfw/src/glx_context.c"
106 #include "external/glfw/src/egl_context.c"
107 #include "external/glfw/src/osmesa_context.c"
110 #if defined(__APPLE__)
111 #include "external/glfw/src/cocoa_init.m"
112 #include "external/glfw/src/cocoa_joystick.m"
113 #include "external/glfw/src/cocoa_monitor.m"
114 #include "external/glfw/src/cocoa_window.m"
115 #include "external/glfw/src/cocoa_time.c"
116 #include "external/glfw/src/posix_thread.c"
117 #include "external/glfw/src/nsgl_context.m"
118 #include "external/glfw/src/egl_context.c"
119 #include "external/glfw/src/osmesa_context.c"