github.com/Konstantin8105/c4go@v0.0.0-20240505174241-768bb1c65a51/tests/raylib/rglfw.c (about) 1 /********************************************************************************************** 2 * 3 * rglfw - raylib GLFW single file compilation 4 * 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. 7 * 8 * LICENSE: zlib/libpng 9 * 10 * Copyright (c) 2017-2022 Ramon Santamaria (@raysan5) 11 * 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. 14 * 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: 17 * 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. 21 * 22 * 2. Altered source versions must be plainly marked as such, and must not be misrepresented 23 * as being the original software. 24 * 25 * 3. This notice may not be removed or altered from any source distribution. 26 * 27 **********************************************************************************************/ 28 29 //#define _GLFW_BUILD_DLL // To build shared version 30 // Ref: http://www.glfw.org/docs/latest/compile.html#compile_manual 31 32 // Platform options: 33 // _GLFW_WIN32 to use the Win32 API 34 // _GLFW_X11 to use the X Window System 35 // _GLFW_WAYLAND to use the Wayland API (experimental and incomplete) 36 // _GLFW_COCOA to use the Cocoa frameworks 37 // _GLFW_OSMESA to use the OSMesa API (headless and non-interactive) 38 // _GLFW_MIR experimental, not supported at this moment 39 40 #if defined(_WIN32) || defined(__CYGWIN__) 41 #define _GLFW_WIN32 42 #endif 43 #if defined(__linux__) 44 #if !defined(_GLFW_WAYLAND) // Required for Wayland windowing 45 #define _GLFW_X11 46 #endif 47 #endif 48 #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) 49 #define _GLFW_X11 50 #endif 51 #if defined(__APPLE__) 52 #define _GLFW_COCOA 53 #define _GLFW_USE_MENUBAR // To create and populate the menu bar when the first window is created 54 #define _GLFW_USE_RETINA // To have windows use the full resolution of Retina displays 55 #endif 56 #if defined(__TINYC__) 57 #define _WIN32_WINNT_WINXP 0x0501 58 #endif 59 60 // Common modules to all platforms 61 #include "external/glfw/src/init.c" 62 #include "external/glfw/src/platform.c" 63 #include "external/glfw/src/context.c" 64 #include "external/glfw/src/monitor.c" 65 #include "external/glfw/src/window.c" 66 #include "external/glfw/src/input.c" 67 #include "external/glfw/src/vulkan.c" 68 69 #if defined(_WIN32) || defined(__CYGWIN__) 70 #include "external/glfw/src/win32_init.c" 71 #include "external/glfw/src/win32_module.c" 72 #include "external/glfw/src/win32_monitor.c" 73 #include "external/glfw/src/win32_window.c" 74 #include "external/glfw/src/win32_joystick.c" 75 #include "external/glfw/src/win32_time.c" 76 #include "external/glfw/src/win32_thread.c" 77 #include "external/glfw/src/wgl_context.c" 78 79 #include "external/glfw/src/egl_context.c" 80 #include "external/glfw/src/osmesa_context.c" 81 #endif 82 83 #if defined(__linux__) 84 #include "external/glfw/src/posix_module.c" 85 #include "external/glfw/src/posix_thread.c" 86 #include "external/glfw/src/posix_time.c" 87 #include "external/glfw/src/posix_poll.c" 88 #include "external/glfw/src/linux_joystick.c" 89 #include "external/glfw/src/xkb_unicode.c" 90 91 #include "external/glfw/src/egl_context.c" 92 #include "external/glfw/src/osmesa_context.c" 93 94 #if defined(_GLFW_WAYLAND) 95 #include "external/glfw/src/wl_init.c" 96 #include "external/glfw/src/wl_monitor.c" 97 #include "external/glfw/src/wl_window.c" 98 #endif 99 #if defined(_GLFW_X11) 100 #include "external/glfw/src/x11_init.c" 101 #include "external/glfw/src/x11_monitor.c" 102 #include "external/glfw/src/x11_window.c" 103 #include "external/glfw/src/glx_context.c" 104 #endif 105 #endif 106 107 #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__) || defined(__DragonFly__) 108 #include "external/glfw/src/posix_module.c" 109 #include "external/glfw/src/posix_thread.c" 110 #include "external/glfw/src/posix_time.c" 111 #include "external/glfw/src/null_joystick.c" 112 #include "external/glfw/src/xkb_unicode.c" 113 114 #include "external/glfw/src/x11_init.c" 115 #include "external/glfw/src/x11_monitor.c" 116 #include "external/glfw/src/x11_window.c" 117 #include "external/glfw/src/glx_context.c" 118 119 #include "external/glfw/src/egl_context.c" 120 #include "external/glfw/src/osmesa_context.c" 121 #endif 122 123 #if defined(__APPLE__) 124 #include "external/glfw/src/posix_module.c" 125 #include "external/glfw/src/posix_thread.c" 126 #include "external/glfw/src/cocoa_init.m" 127 #include "external/glfw/src/cocoa_joystick.m" 128 #include "external/glfw/src/cocoa_monitor.m" 129 #include "external/glfw/src/cocoa_window.m" 130 #include "external/glfw/src/cocoa_time.c" 131 #include "external/glfw/src/nsgl_context.m" 132 133 #include "external/glfw/src/egl_context.c" 134 #include "external/glfw/src/osmesa_context.c" 135 #endif