Logo

index : raylib-jai

Bindings from https://solarium.technology

  • summary
  • about
  • tree
  • log
  • branches
<< path: root/public/raylib-jai.git/html/Raylib/raylib/src/rglfw.c blob: b167955bcd2ffd41c8d7eaf0e2160bee22032410 [raw] [clear marker]

        
0/**********************************************************************************************
1*
2* rglfw - raylib GLFW single file compilation
3*
4* This file includes latest GLFW sources (https://github.com/glfw/glfw) to be compiled together
5* with raylib for all supported platforms, this way, no external dependencies are required.
6*
7* LICENSE: zlib/libpng
8*
9* Copyright (c) 2017-2025 Ramon Santamaria (@raysan5)
10*
11* This software is provided "as-is", without any express or implied warranty. In no event
12* will the authors be held liable for any damages arising from the use of this software.
13*
14* Permission is granted to anyone to use this software for any purpose, including commercial
15* applications, and to alter it and redistribute it freely, subject to the following restrictions:
16*
17* 1. The origin of this software must not be misrepresented; you must not claim that you
18* wrote the original software. If you use this software in a product, an acknowledgment
19* in the product documentation would be appreciated but is not required.
20*
21* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
22* as being the original software.
23*
24* 3. This notice may not be removed or altered from any source distribution.
25*
26**********************************************************************************************/
27
28//#define _GLFW_BUILD_DLL // To build shared version
29// Ref: http://www.glfw.org/docs/latest/compile.html#compile_manual
30
31// Platform options:
32// _GLFW_WIN32 to use the Win32 API
33// _GLFW_X11 to use the X Window System
34// _GLFW_WAYLAND to use the Wayland API (experimental and incomplete)
35// _GLFW_COCOA to use the Cocoa frameworks
36//
37// On Linux, _GLFW_X11 and _GLFW_WAYLAND can be combined
38
39//----------------------------------------------------------------------------------
40// Feature Test Macros required for this module
41//----------------------------------------------------------------------------------
42#if (defined(__linux__) || defined(PLATFORM_WEB)) && (_POSIX_C_SOURCE < 199309L)
43 #undef _POSIX_C_SOURCE
44 #define _POSIX_C_SOURCE 199309L // Required for: CLOCK_MONOTONIC if compiled with c99 without gnu ext.
45#endif
46#if (defined(__linux__) || defined(PLATFORM_WEB)) && !defined(_GNU_SOURCE)
47 #undef _GNU_SOURCE
48 #define _GNU_SOURCE // Required for: ppoll if compiled with c99 without gnu ext.
49#endif
50
51#if defined(_WIN32) || defined(__CYGWIN__)
52 #define _GLFW_WIN32
53#endif
54#if defined(__linux__)
55 #if !defined(_GLFW_WAYLAND) && !defined(_GLFW_X11)
56 #error "Cannot disable Wayland and X11 at the same time"
57 #endif
58#endif
59#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
60 #define _GLFW_X11
61#endif
62#if defined(__APPLE__)
63 #define _GLFW_COCOA
64 #define _GLFW_USE_MENUBAR // To create and populate the menu bar when the first window is created
65 #define _GLFW_USE_RETINA // To have windows use the full resolution of Retina displays
66#endif
67#if defined(__TINYC__)
68 #define _WIN32_WINNT_WINXP 0x0501
69#endif
70
71// Common modules to all platforms
72#include "external/glfw/src/init.c"
73#include "external/glfw/src/platform.c"
74#include "external/glfw/src/context.c"
75#include "external/glfw/src/monitor.c"
76#include "external/glfw/src/window.c"
77#include "external/glfw/src/input.c"
78#include "external/glfw/src/vulkan.c"
79
80#if defined(_WIN32) || defined(__CYGWIN__)
81 #include "external/glfw/src/win32_init.c"
82 #include "external/glfw/src/win32_module.c"
83 #include "external/glfw/src/win32_monitor.c"
84 #include "external/glfw/src/win32_window.c"
85 #include "external/glfw/src/win32_joystick.c"
86 #include "external/glfw/src/win32_time.c"
87 #include "external/glfw/src/win32_thread.c"
88 #include "external/glfw/src/wgl_context.c"
89
90 #include "external/glfw/src/egl_context.c"
91 #include "external/glfw/src/osmesa_context.c"
92#endif
93
94#if defined(__linux__)
95 #include "external/glfw/src/posix_module.c"
96 #include "external/glfw/src/posix_thread.c"
97 #include "external/glfw/src/posix_time.c"
98 #include "external/glfw/src/posix_poll.c"
99 #include "external/glfw/src/linux_joystick.c"
100 #include "external/glfw/src/xkb_unicode.c"
101
102 #include "external/glfw/src/egl_context.c"
103 #include "external/glfw/src/osmesa_context.c"
104
105 #if defined(_GLFW_WAYLAND)
106 #include "external/glfw/src/wl_init.c"
107 #include "external/glfw/src/wl_monitor.c"
108 #include "external/glfw/src/wl_window.c"
109 #endif
110 #if defined(_GLFW_X11)
111 #include "external/glfw/src/x11_init.c"
112 #include "external/glfw/src/x11_monitor.c"
113 #include "external/glfw/src/x11_window.c"
114 #include "external/glfw/src/glx_context.c"
115 #endif
116#endif
117
118#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__) || defined(__DragonFly__)
119 #include "external/glfw/src/posix_module.c"
120 #include "external/glfw/src/posix_thread.c"
121 #include "external/glfw/src/posix_time.c"
122 #include "external/glfw/src/posix_poll.c"
123 #include "external/glfw/src/null_joystick.c"
124 #include "external/glfw/src/xkb_unicode.c"
125
126 #include "external/glfw/src/x11_init.c"
127 #include "external/glfw/src/x11_monitor.c"
128 #include "external/glfw/src/x11_window.c"
129 #include "external/glfw/src/glx_context.c"
130
131 #include "external/glfw/src/egl_context.c"
132 #include "external/glfw/src/osmesa_context.c"
133#endif
134
135#if defined(__APPLE__)
136 #include "external/glfw/src/posix_module.c"
137 #include "external/glfw/src/posix_thread.c"
138 #include "external/glfw/src/cocoa_init.m"
139 #include "external/glfw/src/cocoa_joystick.m"
140 #include "external/glfw/src/cocoa_monitor.m"
141 #include "external/glfw/src/cocoa_window.m"
142 #include "external/glfw/src/cocoa_time.c"
143 #include "external/glfw/src/nsgl_context.m"
144
145 #include "external/glfw/src/egl_context.c"
146 #include "external/glfw/src/osmesa_context.c"
147#endif
148
Copyright 2026  E766CB298A6D1E64 | Git-Thing heavily inspired by cgit