├── .github └── workflows │ └── nob.yaml ├── .gitignore ├── CHANGELOG.txt ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── musializer-logged.bat ├── nob.c ├── resources ├── fonts │ ├── Alegreya-Regular.ttf │ └── OFL.txt ├── icons │ ├── fullscreen.png │ ├── fullscreen.svg │ ├── microphone.png │ ├── microphone.svg │ ├── play.png │ ├── play.svg │ ├── render.png │ ├── render.svg │ ├── volume.png │ └── volume.svg ├── logo │ ├── logo-256.ico │ ├── logo-256.png │ └── logo.svg └── shaders │ ├── glsl120 │ └── circle.fs │ └── glsl330 │ └── circle.fs ├── src ├── ffmpeg.h ├── ffmpeg_posix.c ├── ffmpeg_windows.c ├── hotreload.h ├── hotreload_posix.c ├── hotreload_windows.c ├── musializer.c ├── musializer.rc ├── plug.c ├── plug.h └── utf8.xml ├── src_build ├── Info.plist ├── configurer.c ├── nob_linux.c ├── nob_macos.c ├── nob_openbsd.c ├── nob_stage2.c ├── nob_win64_mingw.c └── nob_win64_msvc.c └── thirdparty ├── nob.h ├── raylib-5.5 ├── .gitignore ├── LICENSE ├── README └── src │ ├── CMakeLists.txt │ ├── Makefile │ ├── config.h │ ├── external │ ├── RGFW.h │ ├── cgltf.h │ ├── dirent.h │ ├── dr_flac.h │ ├── dr_mp3.h │ ├── dr_wav.h │ ├── glad.h │ ├── glad_gles2.h │ ├── glfw │ │ ├── .mailmap │ │ ├── CMake │ │ │ ├── GenerateMappings.cmake │ │ │ ├── Info.plist.in │ │ │ ├── cmake_uninstall.cmake.in │ │ │ ├── glfw3.pc.in │ │ │ ├── glfw3Config.cmake.in │ │ │ ├── i686-w64-mingw32-clang.cmake │ │ │ ├── i686-w64-mingw32.cmake │ │ │ ├── modules │ │ │ │ ├── FindEpollShim.cmake │ │ │ │ └── FindOSMesa.cmake │ │ │ ├── x86_64-w64-mingw32-clang.cmake │ │ │ └── x86_64-w64-mingw32.cmake │ │ ├── CMakeLists.txt │ │ ├── CONTRIBUTORS.md │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── deps │ │ │ ├── getopt.c │ │ │ ├── getopt.h │ │ │ ├── glad │ │ │ │ ├── gl.h │ │ │ │ ├── gles2.h │ │ │ │ └── vulkan.h │ │ │ ├── mingw │ │ │ │ ├── _mingw_dxhelper.h │ │ │ │ ├── dinput.h │ │ │ │ └── xinput.h │ │ │ └── wayland │ │ │ │ ├── fractional-scale-v1.xml │ │ │ │ ├── idle-inhibit-unstable-v1.xml │ │ │ │ ├── pointer-constraints-unstable-v1.xml │ │ │ │ ├── relative-pointer-unstable-v1.xml │ │ │ │ ├── viewporter.xml │ │ │ │ ├── wayland.xml │ │ │ │ ├── xdg-activation-v1.xml │ │ │ │ ├── xdg-decoration-unstable-v1.xml │ │ │ │ └── xdg-shell.xml │ │ ├── include │ │ │ └── GLFW │ │ │ │ ├── glfw3.h │ │ │ │ └── glfw3native.h │ │ └── src │ │ │ ├── CMakeLists.txt │ │ │ ├── cocoa_init.m │ │ │ ├── cocoa_joystick.h │ │ │ ├── cocoa_joystick.m │ │ │ ├── cocoa_monitor.m │ │ │ ├── cocoa_platform.h │ │ │ ├── cocoa_time.c │ │ │ ├── cocoa_time.h │ │ │ ├── cocoa_window.m │ │ │ ├── context.c │ │ │ ├── egl_context.c │ │ │ ├── glfw.rc.in │ │ │ ├── glx_context.c │ │ │ ├── init.c │ │ │ ├── input.c │ │ │ ├── internal.h │ │ │ ├── linux_joystick.c │ │ │ ├── linux_joystick.h │ │ │ ├── mappings.h │ │ │ ├── mappings.h.in │ │ │ ├── monitor.c │ │ │ ├── nsgl_context.m │ │ │ ├── null_init.c │ │ │ ├── null_joystick.c │ │ │ ├── null_joystick.h │ │ │ ├── null_monitor.c │ │ │ ├── null_platform.h │ │ │ ├── null_window.c │ │ │ ├── osmesa_context.c │ │ │ ├── platform.c │ │ │ ├── platform.h │ │ │ ├── posix_module.c │ │ │ ├── posix_poll.c │ │ │ ├── posix_poll.h │ │ │ ├── posix_thread.c │ │ │ ├── posix_thread.h │ │ │ ├── posix_time.c │ │ │ ├── posix_time.h │ │ │ ├── vulkan.c │ │ │ ├── wgl_context.c │ │ │ ├── win32_init.c │ │ │ ├── win32_joystick.c │ │ │ ├── win32_joystick.h │ │ │ ├── win32_module.c │ │ │ ├── win32_monitor.c │ │ │ ├── win32_platform.h │ │ │ ├── win32_thread.c │ │ │ ├── win32_thread.h │ │ │ ├── win32_time.c │ │ │ ├── win32_time.h │ │ │ ├── win32_window.c │ │ │ ├── window.c │ │ │ ├── wl_init.c │ │ │ ├── wl_monitor.c │ │ │ ├── wl_platform.h │ │ │ ├── wl_window.c │ │ │ ├── x11_init.c │ │ │ ├── x11_monitor.c │ │ │ ├── x11_platform.h │ │ │ ├── x11_window.c │ │ │ ├── xkb_unicode.c │ │ │ └── xkb_unicode.h │ ├── jar_mod.h │ ├── jar_xm.h │ ├── m3d.h │ ├── miniaudio.h │ ├── msf_gif.h │ ├── par_shapes.h │ ├── qoa.h │ ├── qoaplay.c │ ├── qoi.h │ ├── rl_gputex.h │ ├── rprand.h │ ├── sdefl.h │ ├── sinfl.h │ ├── stb_image.h │ ├── stb_image_resize2.h │ ├── stb_image_write.h │ ├── stb_perlin.h │ ├── stb_rect_pack.h │ ├── stb_truetype.h │ ├── stb_vorbis.c │ ├── tinyobj_loader_c.h │ ├── vox_loader.h │ └── win32_clipboard.h │ ├── minshell.html │ ├── platforms │ ├── rcore_android.c │ ├── rcore_desktop_glfw.c │ ├── rcore_desktop_rgfw.c │ ├── rcore_desktop_sdl.c │ ├── rcore_drm.c │ ├── rcore_template.c │ └── rcore_web.c │ ├── raudio.c │ ├── raylib.dll.rc │ ├── raylib.dll.rc.data │ ├── raylib.h │ ├── raylib.ico │ ├── raylib.rc │ ├── raylib.rc.data │ ├── raymath.h │ ├── rcamera.h │ ├── rcore.c │ ├── rgestures.h │ ├── rglfw.c │ ├── rlgl.h │ ├── rmodels.c │ ├── rshapes.c │ ├── rtext.c │ ├── rtextures.c │ ├── shell.html │ ├── utils.c │ └── utils.h ├── tinyfiledialogs.c └── tinyfiledialogs.h /.github/workflows/nob.yaml: -------------------------------------------------------------------------------- 1 | name: no-build build 2 | on: [push, pull_request] 3 | 4 | jobs: 5 | macos: 6 | runs-on: macos-latest 7 | steps: 8 | - name: Clone GIT repo 9 | uses: actions/checkout@v4 10 | - name: Build nob 11 | run: clang -o nob nob.c 12 | - name: Run nob 13 | run: ./nob 14 | - name: Upload build folder 15 | uses: actions/upload-artifact@v4 16 | with: 17 | name: macos-build-folder 18 | path: build/ 19 | ubuntu: 20 | strategy: 21 | matrix: 22 | cc: [gcc, clang] 23 | runs-on: ubuntu-latest 24 | steps: 25 | - name: Clone GIT repo 26 | uses: actions/checkout@v4 27 | - name: Pull Deps 28 | run: sudo apt install xorg-dev 29 | - name: Build nob 30 | run: ${{ matrix.cc }} -o nob nob.c 31 | - name: Run nob 32 | run: ./nob 33 | - name: Upload build folder 34 | uses: actions/upload-artifact@v4 35 | with: 36 | name: ubuntu-${{ matrix.cc }}-build-folder 37 | path: build/ 38 | windows: 39 | name: windows (${{ matrix.hotreload == true && 'hotreload' || '' }}) 40 | runs-on: windows-latest 41 | strategy: 42 | matrix: 43 | hotreload: [true, false] 44 | steps: 45 | - name: Clone GIT repo 46 | uses: actions/checkout@v4 47 | - name: Build nob 48 | shell: cmd 49 | # cl.exe isn't available as-is in Github images because they don't want 50 | # to, so we need to pull env vars ourselves. Refs: 51 | # https://github.com/actions/runner-images/issues/6205#issuecomment-1241573412 52 | # https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#create-your-own-command-prompt-shortcut 53 | run: | 54 | call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat" 55 | cl.exe /Fenob nob.c 56 | - name: Run nob 57 | shell: cmd 58 | run: | 59 | call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat" 60 | nob.exe config ${{ matrix.hotreload == true && 'hotreload' || '' }} 61 | nob.exe 62 | - name: Upload build folder 63 | uses: actions/upload-artifact@v4 64 | with: 65 | name: windows-${{ matrix.hotreload == true && 'hotreload' || '' }}-build-folder 66 | path: build/ 67 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Music folder for testing. Ignoring to prevent accidental copyright infringement. 2 | music/ 3 | 4 | # Musializer output 5 | *.mp4 6 | *.wav 7 | 8 | # Vim 9 | *.swp 10 | 11 | # Nob artifacts 12 | build/ 13 | nob 14 | nob.old 15 | nob.exe 16 | nob.exe.old 17 | nob.obj 18 | -------------------------------------------------------------------------------- /CHANGELOG.txt: -------------------------------------------------------------------------------- 1 | Alpha Release 3 2 | ---------------------------------------------------------------------- 3 | 4 | - Finally got rid of the resource/ folder. It's now part of the 5 | executable 6 | 7 | - Added FLAC support 8 | 9 | - Added Cancel Rendering button 10 | 11 | - Added File Dialogs for adding new tracks and specifying the output 12 | path for the rendered video 13 | 14 | - Scroll track labels on hover (by @abhra0897) 15 | 16 | Windows Alpha Release 2 17 | ---------------------------------------------------------------------- 18 | 19 | Hello! After 6 months of active work (actually no, I personally was 20 | not actively working on Musializer during those 6 months, I have 21 | shedton of other projects to worry about, sorry :D) we finally shipped 22 | the Second Alpha Release on Windows! \o/ 23 | 24 | In this release we focused on adding proper UI that will eventually 25 | tie together an ability to render specific local files that you 26 | Drag&Drop on the window and recording from your microphone and 27 | speakers (which is not available yet but we hope to deliver it in the 28 | forthcoming releases). 29 | 30 | Here are the notable changes: 31 | 32 | - Added timeline. Now you can jump to any place of the song during 33 | the preview. 34 | 35 | - Multiple Files Support: all the Drag&Drop-ed files are preserved 36 | and you can switch between them. 37 | 38 | - Added master Volume Control. It controls the volume during the 39 | preview. It does not affect the audio of the final rendered video. 40 | 41 | - Added a Fullscreen Button that hides all of the controls introduced 42 | recently to enable people using Musializer a backdrop for 43 | screenshots, videos, etc. 44 | 45 | - Added a Play Button to pause/unpause the previewed song. 46 | 47 | - Added a Render Button to start rendering. IMPORTANT! The shortcut 48 | for Rendering is now R, not F! 49 | 50 | - Fixed crash on Windows 7 when rendering the video 51 | https://github.com/tsoding/musializer/pull/14 52 | 53 | Windows Alpha Release 1 54 | ---------------------------------------------------------------------- 55 | Hello! This is the first ever Alpha Release of Musializer on Windows! 56 | 57 | - Double-click musializer.exe. It's not signed or anything cause I 58 | don't know how to do that. So Windows may freak out about that a 59 | bit. You just have to believe me that I didn't put in viruses in 60 | here. At least intentionally... 61 | 62 | - Drag&Drop some music onto the window. Not all formats are supported, 63 | so some files could be rejected. 64 | 65 | - Press Space to Pause/Unpause. 66 | 67 | - Press F to render the video. It creates output.mp4 in the same 68 | folder as musializer.exe. Keep in mind that it can take some time. 69 | 70 | - If you need to check the logs use musializer-logged.bat instead of 71 | musializer.exe. It generated log.txt file which contains the logs. 72 | 73 | - Don't expect too much from this application! It's not even Beta yet! 74 | 75 | - The full source code is available at 76 | https://github.com/tsoding/musializer 77 | 78 | - Have fun! 79 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | I have very limited resources in terms of handling feedback on my projects. So here are the limitations to keep in mind: 2 | 3 | - I only look into **small** PRs that suggest 4 | - bug fixes, 5 | - documentation fixes. 6 | - I do not look into PRs that 7 | - implement new features, 8 | - refactor/cleanup the code. 9 | - What qualifies as a bug, a feature, or refactoring is entirely upon my interpretation. 10 | 11 | If you want to stir the project in a particular direction in terms of features feel free to fork it, I don't mind. 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2023 Alexey Kutepov and Musializer Contributors 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Musializer 2 | 3 |

4 | 5 |

6 | 7 | > [!WARNING] 8 | > This software is unfinished. Keep your expectations low. 9 | 10 | The project aims to make a tool for creating beautiful music visualizations and rendering high quality videos of them. 11 | 12 | *Please, read [CONTRIBUTING.md](CONTRIBUTING.md) before making a PR.* 13 | 14 | ## Demo 15 | 16 | *Music by [@nu11](https://soundcloud.com/nu11_ft) from [https://soundcloud.com/nu11_ft/nu11-wip-works-2016-2022](https://soundcloud.com/nu11_ft/nu11-wip-works-2016-2022) at 20:38* 17 | 18 | https://github.com/tsoding/musializer/assets/165283/8b9f9653-9b3d-4c04-9569-338fa19af071 19 | 20 | ## Supported Audio Formats 21 | 22 | - wav 23 | - ogg 24 | - mp3 25 | - qoa 26 | - xm 27 | - mod 28 | - flac 29 | 30 | ## Download Binaries 31 | 32 | - Windows: [musializer-alpha2-win64.zip](https://github.com/tsoding/musializer/releases/download/alpha2/musializer-alpha2-win64.zip) 33 | - Linux: *in progress* 34 | 35 | ## Build from Source 36 | 37 | External Dependencies: 38 | - [ffmpeg](https://ffmpeg.org/) executable available in `PATH` environment variable. It is called as a child process during the rendering of the videos. So if you don't plan to render any videos it's completely **optional**. 39 | 40 | We are using Custom Build System written entirely in C called `nob`. It is similar to [nobuild](https://github.com/tsoding/nobuild) in spirit. [nob.h](./src/nob.h) is the Build System and [nob.c](./nob.c) is the program that builds Musializer. 41 | 42 | Before using `nob` you need to bootstrap it. Just compile it with the available C compiler. On Linux it's usually `$ cc -o nob nob.c` on Windows with MSVC from within `vcvarsall.bat` it's `$ cl.exe nob.c`. You only need to boostrap it once. After the bootstrap you can just keep running the same executable over and over again. It even tries to rebuild itself if you modify [nob.c](./nob.c) (which may fail sometimes, so in that case be ready to reboostrap it). 43 | 44 | I really recommend to read [nob.c](./nob.c) and [nob.h](./src/nob.h) to get an idea of how it all actually works. The Build System is a work in progress, so if something breaks be ready to dive into it. 45 | 46 | ### Linux and OpenBSD 47 | 48 | ```console 49 | $ cc -o nob nob.c # ONLY ONCE!!! 50 | $ ./nob 51 | $ ./build/musializer 52 | ``` 53 | 54 | If the build fails because of missing header files, you may need to install the X11 dev packages. 55 | 56 | On Debian, Ubuntu, etc, do this: 57 | 58 | ```console 59 | $ sudo apt install libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev 60 | ``` 61 | 62 | On other distro's, use the appropriate package manager. 63 | 64 | ### Windows MSVC 65 | 66 | From within `vcvarsall.bat` do 67 | 68 | ```console 69 | > cl.exe nob.c # ONLY ONCE!!! 70 | > nob.exe 71 | > build\musializer.exe 72 | ``` 73 | 74 | ### Cross Compilation from Linux to Windows using MinGW-w64 75 | 76 | Install [MinGW-w64](https://www.mingw-w64.org/) from your distro repository. 77 | 78 | Edit `./build/config.h` and set `MUSIALIZER_TARGET_WIN64_MINGW` instead of `MUSIALIZER_TARGET_LINUX`. 79 | 80 | ```console 81 | $ ./nob 82 | $ wine ./build/musializer.exe 83 | ``` 84 | 85 | ## Hot Reloading 86 | 87 | Edit `./build/config.h` and enable `MUSIALIZER_HOTRELOAD`. 88 | 89 | ```console 90 | $ ./nob 91 | $ ./build/musializer 92 | ``` 93 | 94 | Keep the app running. Rebuild with `./nob`. Hot reload by focusing on the window of the app and pressing h. 95 | 96 | The way it works is by putting the majority of the logic of the application into a `libplug` dynamic library and just reloading it when requested. The [rpath](https://en.wikipedia.org/wiki/Rpath) (aka hard-coded run-time search path) for that library is set to `.` and `./build/`. See [src/nob_linux.c](src/nob_linux.c) for more information on how everything is configured. 97 | -------------------------------------------------------------------------------- /musializer-logged.bat: -------------------------------------------------------------------------------- 1 | musializer.exe > log.txt 2 | -------------------------------------------------------------------------------- /nob.c: -------------------------------------------------------------------------------- 1 | #define NOB_IMPLEMENTATION 2 | #define NOB_STRIP_PREFIX 3 | #define NOB_EXPERIMENTAL_DELETE_OLD 4 | #include "./thirdparty/nob.h" 5 | #include "./src_build/configurer.c" 6 | 7 | int main(int argc, char **argv) 8 | { 9 | NOB_GO_REBUILD_URSELF_PLUS(argc, argv, "./thirdparty/nob.h", "./src_build/configurer.c"); 10 | 11 | const char *program = nob_shift_args(&argc, &argv); 12 | 13 | const char *old_build_conf_path = "./build/build.conf"; 14 | int build_conf_exists = nob_file_exists(old_build_conf_path); 15 | if (build_conf_exists < 0) return 1; 16 | if (build_conf_exists) { 17 | // @backcomp 18 | nob_log(NOB_ERROR, "We found %s. That means your build folder has an old schema.", old_build_conf_path); 19 | nob_log(NOB_ERROR, "Instead of %s you are suppose to use %s to configure the build now.", old_build_conf_path, CONFIG_PATH); 20 | nob_log(NOB_ERROR, "Remove your ./build/ folder and run %s again to regenerate the folder with the new schema.", program); 21 | return 1; 22 | } 23 | 24 | nob_log(NOB_INFO, "--- STAGE 1 ---"); 25 | 26 | if (!nob_mkdir_if_not_exists("build")) return 1; 27 | 28 | if (argc > 0) { 29 | const char *command_name = shift(argv, argc); 30 | if (strcmp(command_name, "config") == 0) { 31 | // TODO: an ability to set the target through the `config` command 32 | while (argc > 0) { 33 | const char *flag_name = shift(argv, argc); 34 | bool found = false; 35 | for (size_t i = 0; !found && i < ARRAY_LEN(feature_flags); ++i) { 36 | // TODO: an ability to disable flags that enabled by default 37 | // We don't have such flags yet, but maybe we will at some point? 38 | if (strcmp(feature_flags[i].name, flag_name) == 0) { 39 | feature_flags[i].enabled_by_default = true; 40 | found = true; 41 | } 42 | } 43 | if (!found) { 44 | nob_log(ERROR, "Unknown command `%s`", flag_name); 45 | return 1; 46 | } 47 | } 48 | if (!generate_default_config(CONFIG_PATH)) return 1; 49 | return 0; 50 | } else { 51 | nob_log(ERROR, "Unknown command `%s`", command_name); 52 | return 1; 53 | } 54 | } 55 | 56 | int config_exists = nob_file_exists(CONFIG_PATH); 57 | if (config_exists < 0) return 1; 58 | if (config_exists == 0) { 59 | if (!generate_default_config(CONFIG_PATH)) return 1; 60 | } else { 61 | nob_log(NOB_INFO, "file `%s` already exists", CONFIG_PATH); 62 | } 63 | 64 | if (!generate_config_logger("build/config_logger.c")) return 1; 65 | 66 | Nob_Cmd cmd = {0}; 67 | const char *stage2_binary = "build/nob_stage2"; 68 | nob_cmd_append(&cmd, NOB_REBUILD_URSELF(stage2_binary, "./src_build/nob_stage2.c")); 69 | if (!nob_cmd_run_sync(cmd)) return 1; 70 | 71 | cmd.count = 0; 72 | nob_cmd_append(&cmd, stage2_binary); 73 | nob_da_append_many(&cmd, argv, argc); 74 | if (!nob_cmd_run_sync(cmd)) return 1; 75 | 76 | return 0; 77 | } 78 | -------------------------------------------------------------------------------- /resources/fonts/Alegreya-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsoding/musializer/332a173d3010c5e6bb0c883cd32bc0b6e5c3451f/resources/fonts/Alegreya-Regular.ttf -------------------------------------------------------------------------------- /resources/fonts/OFL.txt: -------------------------------------------------------------------------------- 1 | Copyright 2011 The Alegreya Project Authors (https://github.com/huertatipografica/Alegreya) 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | This license is copied below, and is also available with a FAQ at: 5 | http://scripts.sil.org/OFL 6 | 7 | 8 | ----------------------------------------------------------- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | ----------------------------------------------------------- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide 14 | development of collaborative font projects, to support the font creation 15 | efforts of academic and linguistic communities, and to provide a free and 16 | open framework in which fonts may be shared and improved in partnership 17 | with others. 18 | 19 | The OFL allows the licensed fonts to be used, studied, modified and 20 | redistributed freely as long as they are not sold by themselves. The 21 | fonts, including any derivative works, can be bundled, embedded, 22 | redistributed and/or sold with any software provided that any reserved 23 | names are not used by derivative works. The fonts and derivatives, 24 | however, cannot be released under any other type of license. The 25 | requirement for fonts to remain under this license does not apply 26 | to any document created using the fonts or their derivatives. 27 | 28 | DEFINITIONS 29 | "Font Software" refers to the set of files released by the Copyright 30 | Holder(s) under this license and clearly marked as such. This may 31 | include source files, build scripts and documentation. 32 | 33 | "Reserved Font Name" refers to any names specified as such after the 34 | copyright statement(s). 35 | 36 | "Original Version" refers to the collection of Font Software components as 37 | distributed by the Copyright Holder(s). 38 | 39 | "Modified Version" refers to any derivative made by adding to, deleting, 40 | or substituting -- in part or in whole -- any of the components of the 41 | Original Version, by changing formats or by porting the Font Software to a 42 | new environment. 43 | 44 | "Author" refers to any designer, engineer, programmer, technical 45 | writer or other person who contributed to the Font Software. 46 | 47 | PERMISSION & CONDITIONS 48 | Permission is hereby granted, free of charge, to any person obtaining 49 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 50 | redistribute, and sell modified and unmodified copies of the Font 51 | Software, subject to the following conditions: 52 | 53 | 1) Neither the Font Software nor any of its individual components, 54 | in Original or Modified Versions, may be sold by itself. 55 | 56 | 2) Original or Modified Versions of the Font Software may be bundled, 57 | redistributed and/or sold with any software, provided that each copy 58 | contains the above copyright notice and this license. These can be 59 | included either as stand-alone text files, human-readable headers or 60 | in the appropriate machine-readable metadata fields within text or 61 | binary files as long as those fields can be easily viewed by the user. 62 | 63 | 3) No Modified Version of the Font Software may use the Reserved Font 64 | Name(s) unless explicit written permission is granted by the corresponding 65 | Copyright Holder. This restriction only applies to the primary font name as 66 | presented to the users. 67 | 68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 69 | Software shall not be used to promote, endorse or advertise any 70 | Modified Version, except to acknowledge the contribution(s) of the 71 | Copyright Holder(s) and the Author(s) or with their explicit written 72 | permission. 73 | 74 | 5) The Font Software, modified or unmodified, in part or in whole, 75 | must be distributed entirely under this license, and must not be 76 | distributed under any other license. The requirement for fonts to 77 | remain under this license does not apply to any document created 78 | using the Font Software. 79 | 80 | TERMINATION 81 | This license becomes null and void if any of the above conditions are 82 | not met. 83 | 84 | DISCLAIMER 85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 93 | OTHER DEALINGS IN THE FONT SOFTWARE. 94 | -------------------------------------------------------------------------------- /resources/icons/fullscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsoding/musializer/332a173d3010c5e6bb0c883cd32bc0b6e5c3451f/resources/icons/fullscreen.png -------------------------------------------------------------------------------- /resources/icons/microphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsoding/musializer/332a173d3010c5e6bb0c883cd32bc0b6e5c3451f/resources/icons/microphone.png -------------------------------------------------------------------------------- /resources/icons/microphone.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 36 | 38 | 42 | 51 | 56 | 60 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /resources/icons/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsoding/musializer/332a173d3010c5e6bb0c883cd32bc0b6e5c3451f/resources/icons/play.png -------------------------------------------------------------------------------- /resources/icons/play.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 36 | 38 | 42 | 58 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /resources/icons/render.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsoding/musializer/332a173d3010c5e6bb0c883cd32bc0b6e5c3451f/resources/icons/render.png -------------------------------------------------------------------------------- /resources/icons/render.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 36 | 38 | 42 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /resources/icons/volume.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsoding/musializer/332a173d3010c5e6bb0c883cd32bc0b6e5c3451f/resources/icons/volume.png -------------------------------------------------------------------------------- /resources/icons/volume.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 45 | 47 | 48 | 50 | image/svg+xml 51 | 53 | 54 | 55 | 56 | 57 | 62 | 65 | 71 | 76 | 77 | 80 | 86 | 91 | 96 | 97 | 100 | 106 | 111 | 116 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /resources/logo/logo-256.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsoding/musializer/332a173d3010c5e6bb0c883cd32bc0b6e5c3451f/resources/logo/logo-256.ico -------------------------------------------------------------------------------- /resources/logo/logo-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsoding/musializer/332a173d3010c5e6bb0c883cd32bc0b6e5c3451f/resources/logo/logo-256.png -------------------------------------------------------------------------------- /resources/logo/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 25 | 29 | 33 | 34 | 45 | 46 | 77 | 79 | 80 | 82 | image/svg+xml 83 | 85 | 86 | 87 | 88 | 89 | 94 | 100 | 105 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /resources/shaders/glsl120/circle.fs: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Input vertex attributes (from vertex shader) 4 | varying vec2 fragTexCoord; 5 | varying vec4 fragColor; 6 | 7 | uniform float radius; 8 | uniform float power; 9 | 10 | void main() 11 | { 12 | float r = radius; 13 | vec2 p = fragTexCoord - vec2(0.5); 14 | if (length(p) <= 0.5) { 15 | float s = length(p) - r; 16 | if (s <= 0) { 17 | gl_FragColor = fragColor*1.5; 18 | } else { 19 | float t = 1 - s / (0.5 - r); 20 | gl_FragColor = mix(vec4(fragColor.xyz, 0), fragColor*1.5, pow(t, power)); 21 | } 22 | } else { 23 | gl_FragColor = vec4(0); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /resources/shaders/glsl330/circle.fs: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Input vertex attributes (from vertex shader) 4 | in vec2 fragTexCoord; 5 | in vec4 fragColor; 6 | 7 | uniform float radius; 8 | uniform float power; 9 | 10 | // Output fragment color 11 | out vec4 finalColor; 12 | 13 | void main() 14 | { 15 | float r = radius; 16 | vec2 p = fragTexCoord - vec2(0.5); 17 | if (length(p) <= 0.5) { 18 | float s = length(p) - r; 19 | if (s <= 0) { 20 | finalColor = fragColor*1.5; 21 | } else { 22 | float t = 1 - s / (0.5 - r); 23 | finalColor = mix(vec4(fragColor.xyz, 0), fragColor*1.5, pow(t, power)); 24 | } 25 | } else { 26 | finalColor = vec4(0); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/ffmpeg.h: -------------------------------------------------------------------------------- 1 | #ifndef FFMPEG_H_ 2 | #define FFMPEG_H_ 3 | 4 | #include 5 | #include 6 | 7 | typedef struct FFMPEG FFMPEG; 8 | 9 | FFMPEG *ffmpeg_start_rendering(const char *output_path, size_t width, size_t height, size_t fps, const char *sound_file_path); 10 | bool ffmpeg_send_frame_flipped(FFMPEG *ffmpeg, void *data, size_t width, size_t height); 11 | bool ffmpeg_end_rendering(FFMPEG *ffmpeg, bool cancel); 12 | 13 | #endif // FFMPEG_H_ 14 | -------------------------------------------------------------------------------- /src/ffmpeg_posix.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include 14 | 15 | #include "ffmpeg.h" 16 | 17 | #define READ_END 0 18 | #define WRITE_END 1 19 | 20 | struct FFMPEG { 21 | int pipe; 22 | pid_t pid; 23 | }; 24 | 25 | FFMPEG *ffmpeg_start_rendering(const char *output_path, size_t width, size_t height, size_t fps, const char *sound_file_path) 26 | { 27 | int pipefd[2]; 28 | 29 | if (pipe(pipefd) < 0) { 30 | TraceLog(LOG_ERROR, "FFMPEG: Could not create a pipe: %s", strerror(errno)); 31 | return NULL; 32 | } 33 | 34 | pid_t child = fork(); 35 | if (child < 0) { 36 | TraceLog(LOG_ERROR, "FFMPEG: could not fork a child: %s", strerror(errno)); 37 | return NULL; 38 | } 39 | 40 | if (child == 0) { 41 | if (dup2(pipefd[READ_END], STDIN_FILENO) < 0) { 42 | TraceLog(LOG_ERROR, "FFMPEG CHILD: could not reopen read end of pipe as stdin: %s", strerror(errno)); 43 | exit(1); 44 | } 45 | close(pipefd[WRITE_END]); 46 | 47 | char resolution[64]; 48 | snprintf(resolution, sizeof(resolution), "%zux%zu", width, height); 49 | char framerate[64]; 50 | snprintf(framerate, sizeof(framerate), "%zu", fps); 51 | 52 | int ret = execlp("ffmpeg", 53 | "ffmpeg", 54 | "-loglevel", "verbose", 55 | "-y", 56 | 57 | "-f", "rawvideo", 58 | "-pix_fmt", "rgba", 59 | "-s", resolution, 60 | "-r", framerate, 61 | "-i", "-", 62 | "-i", sound_file_path, 63 | 64 | "-c:v", "libx264", 65 | "-vb", "2500k", 66 | "-c:a", "aac", 67 | "-ab", "200k", 68 | "-pix_fmt", "yuv420p", 69 | output_path, 70 | 71 | NULL 72 | ); 73 | if (ret < 0) { 74 | TraceLog(LOG_ERROR, "FFMPEG CHILD: could not run ffmpeg as a child process: %s", strerror(errno)); 75 | exit(1); 76 | } 77 | assert(0 && "unreachable"); 78 | exit(1); 79 | } 80 | 81 | if (close(pipefd[READ_END]) < 0) { 82 | TraceLog(LOG_WARNING, "FFMPEG: could not close read end of the pipe on the parent's end: %s", strerror(errno)); 83 | } 84 | 85 | FFMPEG *ffmpeg = malloc(sizeof(FFMPEG)); 86 | assert(ffmpeg != NULL && "Buy MORE RAM lol!!"); 87 | ffmpeg->pid = child; 88 | ffmpeg->pipe = pipefd[WRITE_END]; 89 | return ffmpeg; 90 | } 91 | 92 | bool ffmpeg_end_rendering(FFMPEG *ffmpeg, bool cancel) 93 | { 94 | int pipe = ffmpeg->pipe; 95 | pid_t pid = ffmpeg->pid; 96 | 97 | free(ffmpeg); 98 | 99 | if (close(pipe) < 0) { 100 | TraceLog(LOG_WARNING, "FFMPEG: could not close write end of the pipe on the parent's end: %s", strerror(errno)); 101 | } 102 | 103 | if (cancel) kill(pid, SIGKILL); 104 | 105 | for (;;) { 106 | int wstatus = 0; 107 | if (waitpid(pid, &wstatus, 0) < 0) { 108 | TraceLog(LOG_ERROR, "FFMPEG: could not wait for ffmpeg child process to finish: %s", strerror(errno)); 109 | return false; 110 | } 111 | 112 | if (WIFEXITED(wstatus)) { 113 | int exit_status = WEXITSTATUS(wstatus); 114 | if (exit_status != 0) { 115 | TraceLog(LOG_ERROR, "FFMPEG: ffmpeg exited with code %d", exit_status); 116 | return false; 117 | } 118 | 119 | return true; 120 | } 121 | 122 | if (WIFSIGNALED(wstatus)) { 123 | TraceLog(LOG_ERROR, "FFMPEG: ffmpeg got terminated by %s", strsignal(WTERMSIG(wstatus))); 124 | return false; 125 | } 126 | } 127 | 128 | assert(0 && "unreachable"); 129 | } 130 | 131 | bool ffmpeg_send_frame_flipped(FFMPEG *ffmpeg, void *data, size_t width, size_t height) 132 | { 133 | for (size_t y = height; y > 0; --y) { 134 | // TODO: write() may not necessarily write the entire row. We may want to repeat the call. 135 | if (write(ffmpeg->pipe, (uint32_t*)data + (y - 1)*width, sizeof(uint32_t)*width) < 0) { 136 | TraceLog(LOG_ERROR, "FFMPEG: failed to write into ffmpeg pipe: %s", strerror(errno)); 137 | return false; 138 | } 139 | } 140 | return true; 141 | } 142 | -------------------------------------------------------------------------------- /src/ffmpeg_windows.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #define WIN32_LEAN_AND_MEAN 7 | #define _WINUSER_ 8 | #define _WINGDI_ 9 | #define _IMM_ 10 | #define _WINCON_ 11 | #include 12 | 13 | #include 14 | 15 | #include "ffmpeg.h" 16 | 17 | struct FFMPEG { 18 | HANDLE hProcess; 19 | HANDLE hPipeWrite; 20 | }; 21 | 22 | FFMPEG *ffmpeg_start_rendering(const char *output_path, size_t width, size_t height, size_t fps, const char *sound_file_path) 23 | { 24 | HANDLE pipe_read; 25 | HANDLE pipe_write; 26 | 27 | SECURITY_ATTRIBUTES saAttr = {0}; 28 | saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); 29 | saAttr.bInheritHandle = TRUE; 30 | 31 | if (!CreatePipe(&pipe_read, &pipe_write, &saAttr, 0)) { 32 | TraceLog(LOG_ERROR, "FFMPEG: Could not create pipe. System Error Code: %d", GetLastError()); 33 | return NULL; 34 | } 35 | 36 | if (!SetHandleInformation(pipe_write, HANDLE_FLAG_INHERIT, 0)) { 37 | TraceLog(LOG_ERROR, "FFMPEG: Could not mark write pipe as non-inheritable. System Error Code: %d", GetLastError()); 38 | return NULL; 39 | } 40 | 41 | // https://docs.microsoft.com/en-us/windows/win32/procthread/creating-a-child-process-with-redirected-input-and-output 42 | 43 | STARTUPINFO siStartInfo; 44 | ZeroMemory(&siStartInfo, sizeof(siStartInfo)); 45 | siStartInfo.cb = sizeof(STARTUPINFO); 46 | // NOTE: theoretically setting NULL to std handles should not be a problem 47 | // https://docs.microsoft.com/en-us/windows/console/getstdhandle?redirectedfrom=MSDN#attachdetach-behavior 48 | siStartInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE); 49 | if (siStartInfo.hStdError == INVALID_HANDLE_VALUE) { 50 | TraceLog(LOG_ERROR, "FFMPEG: Could get standard error handle for the child. System Error Code: %d", GetLastError()); 51 | return NULL; 52 | } 53 | siStartInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); 54 | if (siStartInfo.hStdOutput == INVALID_HANDLE_VALUE) { 55 | TraceLog(LOG_ERROR, "FFMPEG: Could get standard output handle for the child. System Error Code: %d", GetLastError()); 56 | return NULL; 57 | } 58 | siStartInfo.hStdInput = pipe_read; 59 | siStartInfo.dwFlags |= STARTF_USESTDHANDLES; 60 | 61 | PROCESS_INFORMATION piProcInfo; 62 | ZeroMemory(&piProcInfo, sizeof(PROCESS_INFORMATION)); 63 | 64 | // TODO: use String_Builder in here 65 | // TODO: sanitize user input through sound_file_path 66 | char cmd_buffer[1024*2]; 67 | snprintf(cmd_buffer, sizeof(cmd_buffer), "ffmpeg.exe -loglevel verbose -y -f rawvideo -pix_fmt rgba -s %dx%d -r %d -i - -i \"%s\" -c:v libx264 -vb 2500k -c:a aac -ab 200k -pix_fmt yuv420p %s", (int)width, (int)height, (int)fps, sound_file_path, output_path); 68 | 69 | if (!CreateProcess(NULL, cmd_buffer, NULL, NULL, TRUE, 0, NULL, NULL, &siStartInfo, &piProcInfo)) { 70 | TraceLog(LOG_ERROR, "FFMPEG: Could not create child process. System Error Code: %d", GetLastError()); 71 | 72 | CloseHandle(pipe_write); 73 | CloseHandle(pipe_read); 74 | 75 | return NULL; 76 | } 77 | 78 | CloseHandle(pipe_read); 79 | CloseHandle(piProcInfo.hThread); 80 | 81 | FFMPEG *ffmpeg = malloc(sizeof(FFMPEG)); 82 | assert(ffmpeg != NULL && "Buy MORE RAM lol!!"); 83 | ffmpeg->hProcess = piProcInfo.hProcess; 84 | ffmpeg->hPipeWrite = pipe_write; 85 | return ffmpeg; 86 | } 87 | 88 | bool ffmpeg_send_frame_flipped(FFMPEG *ffmpeg, void *data, size_t width, size_t height) 89 | { 90 | DWORD written; 91 | 92 | for (size_t y = height; y > 0; --y) { 93 | // TODO: handle ERROR_IO_PENDING 94 | if (!WriteFile(ffmpeg->hPipeWrite, (uint32_t*)data + (y - 1)*width, sizeof(uint32_t)*width, &written, NULL)) { 95 | TraceLog(LOG_ERROR, "FFMPEG: failed to write into ffmpeg pipe. System Error Code: %d", GetLastError()); 96 | return false; 97 | } 98 | } 99 | return true; 100 | } 101 | 102 | bool ffmpeg_end_rendering(FFMPEG *ffmpeg, bool cancel) 103 | { 104 | HANDLE hPipeWrite = ffmpeg->hPipeWrite; 105 | HANDLE hProcess = ffmpeg->hProcess; 106 | free(ffmpeg); 107 | 108 | FlushFileBuffers(hPipeWrite); 109 | CloseHandle(hPipeWrite); 110 | 111 | if (cancel) TerminateProcess(hProcess, 69); 112 | 113 | if (WaitForSingleObject(hProcess, INFINITE) == WAIT_FAILED) { 114 | TraceLog(LOG_ERROR, "FFMPEG: could not wait on child process. System Error Code: %d", GetLastError()); 115 | CloseHandle(hProcess); 116 | return false; 117 | } 118 | 119 | DWORD exit_status; 120 | if (GetExitCodeProcess(hProcess, &exit_status) == 0) { 121 | TraceLog(LOG_ERROR, "FFMPEG: could not get process exit code. System Error Code: %d", GetLastError()); 122 | CloseHandle(hProcess); 123 | return false; 124 | } 125 | 126 | if (exit_status != 0) { 127 | TraceLog(LOG_ERROR, "FFMPEG: command exited with exit code %lu", exit_status); 128 | CloseHandle(hProcess); 129 | return false; 130 | } 131 | 132 | CloseHandle(hProcess); 133 | 134 | return true; 135 | } 136 | 137 | // TODO: where can we find this symbol for the Windows build? 138 | void __imp__wassert() {} 139 | -------------------------------------------------------------------------------- /src/hotreload.h: -------------------------------------------------------------------------------- 1 | #ifndef HOTRELOAD_H_ 2 | #define HOTRELOAD_H_ 3 | 4 | #include 5 | 6 | #include "plug.h" 7 | #include "build/config.h" 8 | 9 | #ifdef MUSIALIZER_HOTRELOAD 10 | #define PLUG(name, ...) extern name##_t *name; 11 | LIST_OF_PLUGS 12 | #undef PLUG 13 | bool reload_libplug(void); 14 | #else 15 | #define PLUG(name, ...) name##_t name; 16 | LIST_OF_PLUGS 17 | #undef PLUG 18 | #define reload_libplug() true 19 | #endif // HOTRELOAD 20 | 21 | #endif // HOTRELOAD_H_ 22 | -------------------------------------------------------------------------------- /src/hotreload_posix.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | 6 | #include "hotreload.h" 7 | 8 | #if defined(MUSIALIZER_TARGET_MACOS) 9 | static const char *libplug_file_name = "libplug.dylib"; 10 | #else 11 | static const char *libplug_file_name = "libplug.so"; 12 | #endif 13 | 14 | static void *libplug = NULL; 15 | 16 | #define PLUG(name, ...) name##_t *name = NULL; 17 | LIST_OF_PLUGS 18 | #undef PLUG 19 | 20 | bool reload_libplug(void) 21 | { 22 | if (libplug != NULL) dlclose(libplug); 23 | 24 | libplug = dlopen(libplug_file_name, RTLD_NOW); 25 | if (libplug == NULL) { 26 | TraceLog(LOG_ERROR, "HOTRELOAD: could not load %s: %s", libplug_file_name, dlerror()); 27 | return false; 28 | } 29 | 30 | #define PLUG(name, ...) \ 31 | name = dlsym(libplug, #name); \ 32 | if (name == NULL) { \ 33 | TraceLog(LOG_ERROR, "HOTRELOAD: could not find %s symbol in %s: %s", \ 34 | #name, libplug_file_name, dlerror()); \ 35 | return false; \ 36 | } 37 | LIST_OF_PLUGS 38 | #undef PLUG 39 | 40 | return true; 41 | } 42 | -------------------------------------------------------------------------------- /src/hotreload_windows.c: -------------------------------------------------------------------------------- 1 | #include 2 | #define WIN32_LEAN_AND_MEAN 3 | #define NOGDI 4 | #define NOUSER 5 | #include 6 | 7 | #include 8 | #include "hotreload.h" 9 | 10 | static const char *libplug_file_name = "libplug.dll"; 11 | static void *libplug = NULL; 12 | 13 | #define PLUG(name, ...) name##_t *name = NULL; 14 | LIST_OF_PLUGS 15 | #undef PLUG 16 | 17 | bool reload_libplug(void) 18 | { 19 | if (libplug != NULL) FreeLibrary(libplug); 20 | 21 | libplug = LoadLibrary(libplug_file_name); 22 | if (libplug == NULL) { 23 | TraceLog(LOG_ERROR, "HOTRELOAD: could not load %s: %s", libplug_file_name, GetLastError()); 24 | return false; 25 | } 26 | 27 | #define PLUG(name, ...) \ 28 | name = (void*)GetProcAddress(libplug, #name); \ 29 | if (name == NULL) { \ 30 | TraceLog(LOG_ERROR, "HOTRELOAD: could not find %s symbol in %s: %s", \ 31 | #name, libplug_file_name, GetLastError()); \ 32 | return false; \ 33 | } 34 | LIST_OF_PLUGS 35 | #undef PLUG 36 | 37 | return true; 38 | } 39 | -------------------------------------------------------------------------------- /src/musializer.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | #ifndef _WIN32 9 | #include // needed for sigaction() 10 | #endif // _WIN32 11 | 12 | #include "./hotreload.h" 13 | 14 | int main(void) 15 | { 16 | #ifndef _WIN32 17 | // NOTE: This is needed because if the pipe between Musializer and FFmpeg breaks 18 | // Musializer will receive SIGPIPE on trying to write into it. While such behavior 19 | // makes sense for command line utilities, Musializer is a relatively friendly GUI 20 | // application that is trying to recover from such situations. 21 | struct sigaction act = {0}; 22 | act.sa_handler = SIG_IGN; 23 | sigaction(SIGPIPE, &act, NULL); 24 | #endif // _WIN32 25 | 26 | if (!reload_libplug()) return 1; 27 | 28 | SetConfigFlags(FLAG_WINDOW_RESIZABLE | FLAG_WINDOW_ALWAYS_RUN); 29 | size_t factor = 80; 30 | InitWindow(factor*16, factor*9, "Musializer"); 31 | { 32 | const char *file_path = "./resources/logo/logo-256.png"; 33 | size_t data_size; 34 | void *data = plug_load_resource(file_path, &data_size); 35 | Image logo = LoadImageFromMemory(GetFileExtension(file_path), data, data_size); 36 | SetWindowIcon(logo); 37 | plug_free_resource(data); 38 | } 39 | SetExitKey(KEY_NULL); 40 | InitAudioDevice(); 41 | 42 | plug_init(); 43 | while (!WindowShouldClose()) { 44 | if (IsKeyPressed(KEY_H)) { 45 | void *state = plug_pre_reload(); 46 | if (!reload_libplug()) return 1; 47 | plug_post_reload(state); 48 | } 49 | plug_update(); 50 | } 51 | 52 | CloseAudioDevice(); 53 | CloseWindow(); 54 | 55 | return 0; 56 | } 57 | -------------------------------------------------------------------------------- /src/musializer.rc: -------------------------------------------------------------------------------- 1 | #include 2 | CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "utf8.xml" 3 | id ICON "./resources/logo/logo-256.ico" 4 | -------------------------------------------------------------------------------- /src/plug.h: -------------------------------------------------------------------------------- 1 | #ifndef PLUG_H_ 2 | #define PLUG_H_ 3 | 4 | #define LIST_OF_PLUGS \ 5 | PLUG(plug_init, void, void) \ 6 | PLUG(plug_pre_reload, void*, void) \ 7 | PLUG(plug_post_reload, void, void*) \ 8 | PLUG(plug_load_resource, void*, const char*, size_t*) \ 9 | PLUG(plug_free_resource, void, void*) \ 10 | PLUG(plug_update, void, void) 11 | 12 | #define PLUG(name, ret, ...) typedef ret (name##_t)(__VA_ARGS__); 13 | LIST_OF_PLUGS 14 | #undef PLUG 15 | 16 | #endif // PLUG_H_ 17 | -------------------------------------------------------------------------------- /src/utf8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UTF-8 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src_build/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleExecutable 6 | musializer 7 | CFBundleIdentifier 8 | com.tsoding.musializer 9 | CFBundleName 10 | Musializer 11 | CFBundleIconFile 12 | AppIcon.icns 13 | CFBundleVersion 14 | 1.0 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleGetInfoString 18 | Musializer 1.0 19 | CFBundleInfoDictionaryVersion 20 | 6.0 21 | CFBundlePackageType 22 | APPL 23 | CFBundleSupportedPlatforms 24 | 25 | MacOSX 26 | 27 | NSHumanReadableCopyright 28 | Copyright 2023 Alexey Kutepov and Musializer Contributors 29 | 30 | 31 | -------------------------------------------------------------------------------- /src_build/configurer.c: -------------------------------------------------------------------------------- 1 | #define RAYLIB_VERSION "5.5" 2 | #define CONFIG_PATH "./build/config.h" 3 | #define RAYLIB_SRC_FOLDER "./thirdparty/raylib-" RAYLIB_VERSION "/src/" 4 | 5 | typedef struct { 6 | const char *macro; 7 | bool enabled_by_default; 8 | } Target_Flag; 9 | 10 | static Target_Flag target_flags[] = { 11 | { 12 | .macro = "MUSIALIZER_TARGET_LINUX", 13 | #if defined(linux) || defined(__linux) || defined(__linux__) 14 | .enabled_by_default = true, 15 | #else 16 | .enabled_by_default = false, 17 | #endif 18 | }, 19 | { 20 | .macro = "MUSIALIZER_TARGET_WIN64_MINGW", 21 | #if (defined(WIN32) || defined(_WIN32)) && defined(__MINGW32__) 22 | .enabled_by_default = true, 23 | #else 24 | .enabled_by_default = false, 25 | #endif 26 | }, 27 | { 28 | .macro = "MUSIALIZER_TARGET_WIN64_MSVC", 29 | #if (defined(WIN32) || defined(_WIN32)) && defined(_MSC_VER) 30 | .enabled_by_default = true, 31 | #else 32 | .enabled_by_default = false, 33 | #endif 34 | }, 35 | { 36 | .macro = "MUSIALIZER_TARGET_MACOS", 37 | #if defined(__APPLE__) || defined(__MACH__) 38 | .enabled_by_default = true, 39 | #else 40 | .enabled_by_default = false, 41 | #endif 42 | }, 43 | { 44 | .macro = "MUSIALIZER_TARGET_OPENBSD", 45 | #if defined(__OpenBSD__) 46 | .enabled_by_default = true, 47 | #else 48 | .enabled_by_default = false, 49 | #endif 50 | }, 51 | }; 52 | 53 | typedef struct { 54 | const char *name; 55 | const char *macro; 56 | const char *description; 57 | bool enabled_by_default; 58 | } Feature_Flag; 59 | 60 | static Feature_Flag feature_flags[] = { 61 | { 62 | .macro = "MUSIALIZER_HOTRELOAD", 63 | .name = "hotreload", 64 | .description = "Moves everything in src/plug.c to a separate \"DLL\" so it can be hotreloaded.", 65 | }, 66 | { 67 | .macro = "MUSIALIZER_UNBUNDLE", 68 | .name = "unbundle", 69 | .description = "Don't bundle resources/ folder with the executable and load the resources directly from the folder.", 70 | }, 71 | { 72 | .macro = "MUSIALIZER_MICROPHONE", 73 | .name = "microphone", 74 | .description = "Unfinished feature that enables capturing sound from the mic." 75 | }, 76 | }; 77 | 78 | // Removed feature flags 79 | #ifdef MUSIALIZER_ACT_ON_PRESS 80 | #error "MUSIALIZER_ACT_ON_PRESS no longer exists. Please remove it from your build/config.h" 81 | #endif // MUSIALIZER_ACT_ON_PRESS 82 | 83 | #define genf(out, ...) \ 84 | do { \ 85 | fprintf((out), __VA_ARGS__); \ 86 | fprintf((out), " // %s:%d\n", __FILE__, __LINE__); \ 87 | } while(0) 88 | 89 | bool generate_default_config(const char *file_path) 90 | { 91 | nob_log(NOB_INFO, "Generating %s", file_path); 92 | FILE *f = fopen(file_path, "wb"); 93 | if (f == NULL) { 94 | nob_log(NOB_ERROR, "Could not generate %s: %s", file_path, strerror(errno)); 95 | return false; 96 | } 97 | 98 | // TODO: generate_default_config() should also log what platform it picked 99 | fprintf(f, "//// Build target. Pick only one!\n"); 100 | for (size_t i = 0; i < NOB_ARRAY_LEN(target_flags); ++i) { 101 | if (target_flags[i].enabled_by_default) { 102 | fprintf(f, "#define %s\n", target_flags[i].macro); 103 | } else { 104 | fprintf(f, "// #define %s\n", target_flags[i].macro); 105 | } 106 | } 107 | 108 | fprintf(f, "\n"); 109 | 110 | for (size_t i = 0; i < NOB_ARRAY_LEN(feature_flags); ++i) { 111 | fprintf(f, "//// %s\n", feature_flags[i].description); 112 | if (feature_flags[i].enabled_by_default) { 113 | nob_log(INFO, "%s: ENABLED", feature_flags[i].name); 114 | fprintf(f, "#define %s\n", feature_flags[i].macro); 115 | } else { 116 | nob_log(INFO, "%s: DISABLED", feature_flags[i].name); 117 | fprintf(f, "// #define %s\n", feature_flags[i].macro); 118 | } 119 | fprintf(f, "\n"); 120 | 121 | } 122 | 123 | fclose(f); 124 | return true; 125 | } 126 | 127 | bool generate_config_logger(const char *config_logger_path) 128 | { 129 | nob_log(NOB_INFO, "Generating %s", config_logger_path); 130 | FILE *f = fopen(config_logger_path, "wb"); 131 | if (f == NULL) { 132 | nob_log(NOB_ERROR, "Could not generate %s: %s", config_logger_path, strerror(errno)); 133 | return false; 134 | } 135 | 136 | genf(f, "void log_config(Nob_Log_Level level)"); 137 | genf(f, "{"); 138 | genf(f, " nob_log(level, \"Target: %%s\", MUSIALIZER_TARGET_NAME);"); 139 | for (size_t i = 0; i < NOB_ARRAY_LEN(feature_flags); ++i) { 140 | genf(f, " #ifdef %s", feature_flags[i].macro); 141 | genf(f, " nob_log(level, \"%s: ENABLED\");", feature_flags[i].name); 142 | genf(f, " #else"); 143 | genf(f, " nob_log(level, \"%s: DISABLED\");", feature_flags[i].name); 144 | genf(f, " #endif"); 145 | } 146 | genf(f, "}"); 147 | 148 | fclose(f); 149 | return true; 150 | } 151 | -------------------------------------------------------------------------------- /src_build/nob_linux.c: -------------------------------------------------------------------------------- 1 | #define MUSIALIZER_TARGET_NAME "linux" 2 | 3 | bool build_musializer(void) 4 | { 5 | bool result = true; 6 | Nob_Cmd cmd = {0}; 7 | Nob_Procs procs = {0}; 8 | 9 | #ifdef MUSIALIZER_HOTRELOAD 10 | // TODO: add a way to replace `cc` with something else GCC compatible on POSIX 11 | // Like `clang` for instance 12 | nob_cmd_append(&cmd, "cc", 13 | "-Wall", "-Wextra", "-ggdb", 14 | "-I.", "-I"RAYLIB_SRC_FOLDER, 15 | "-fPIC", "-shared", 16 | "-o", "./build/libplug.so", 17 | "./src/plug.c", "./src/ffmpeg_posix.c", "./thirdparty/tinyfiledialogs.c", 18 | nob_temp_sprintf("-L./build/raylib/%s", MUSIALIZER_TARGET_NAME), "-l:libraylib.so", 19 | "-O3", "-march=native", "-ffast-math", 20 | "-lm", "-ldl", "-flto=auto", "-lpthread"); 21 | nob_da_append(&procs, nob_cmd_run_async_and_reset(&cmd)); 22 | 23 | nob_cmd_append(&cmd, "cc", 24 | "-Wall", "-Wextra", "-ggdb", 25 | "-I.", "-I"RAYLIB_SRC_FOLDER, 26 | "-o", "./build/musializer", 27 | "./src/musializer.c", "./src/hotreload_posix.c", 28 | "-Wl,-rpath=./build/", 29 | "-Wl,-rpath=./", 30 | nob_temp_sprintf("-Wl,-rpath=./build/raylib/%s", MUSIALIZER_TARGET_NAME), 31 | // NOTE: just in case somebody wants to run musializer from within the ./build/ folder 32 | nob_temp_sprintf("-Wl,-rpath=./raylib/%s", MUSIALIZER_TARGET_NAME), 33 | nob_temp_sprintf("-L./build/raylib/%s", MUSIALIZER_TARGET_NAME), 34 | "-O3", "-march=native", "-ffast-math", 35 | "-l:libraylib.so", "-lm", "-ldl", "-flto=auto", "-lpthread"); 36 | nob_da_append(&procs, nob_cmd_run_async_and_reset(&cmd)); 37 | 38 | if (!nob_procs_wait_and_reset(&procs)) nob_return_defer(false); 39 | #else 40 | nob_cmd_append(&cmd, "cc", 41 | "-Wall", "-Wextra", "-ggdb", 42 | "-I.", 43 | "-I"RAYLIB_SRC_FOLDER, 44 | "-o", "./build/musializer", 45 | "./src/plug.c", "./src/ffmpeg_posix.c", "./src/musializer.c", "./thirdparty/tinyfiledialogs.c", 46 | nob_temp_sprintf("-L./build/raylib/%s", MUSIALIZER_TARGET_NAME), "-l:libraylib.a", 47 | "-O3", "-march=native", "-ffast-math", 48 | "-lm", "-ldl", "-flto=auto", "-lpthread"); 49 | if (!nob_cmd_run_sync_and_reset(&cmd)) nob_return_defer(false); 50 | #endif // MUSIALIZER_HOTRELOAD 51 | 52 | defer: 53 | nob_cmd_free(cmd); 54 | nob_da_free(procs); 55 | return result; 56 | } 57 | 58 | bool build_raylib(void) 59 | { 60 | bool result = true; 61 | Nob_Cmd cmd = {0}; 62 | Nob_File_Paths object_files = {0}; 63 | 64 | if (!nob_mkdir_if_not_exists("./build/raylib")) { 65 | nob_return_defer(false); 66 | } 67 | 68 | Nob_Procs procs = {0}; 69 | 70 | const char *build_path = nob_temp_sprintf("./build/raylib/%s", MUSIALIZER_TARGET_NAME); 71 | 72 | if (!nob_mkdir_if_not_exists(build_path)) { 73 | nob_return_defer(false); 74 | } 75 | 76 | for (size_t i = 0; i < NOB_ARRAY_LEN(raylib_modules); ++i) { 77 | const char *input_path = nob_temp_sprintf(RAYLIB_SRC_FOLDER"%s.c", raylib_modules[i]); 78 | const char *output_path = nob_temp_sprintf("%s/%s.o", build_path, raylib_modules[i]); 79 | output_path = nob_temp_sprintf("%s/%s.o", build_path, raylib_modules[i]); 80 | 81 | nob_da_append(&object_files, output_path); 82 | 83 | if (nob_needs_rebuild(output_path, &input_path, 1)) { 84 | nob_cmd_append(&cmd, "cc", 85 | "-ggdb", "-DPLATFORM_DESKTOP", "-D_GLFW_X11", "-fPIC", "-DSUPPORT_FILEFORMAT_FLAC=1", 86 | "-I"RAYLIB_SRC_FOLDER"external/glfw/include", 87 | "-c", input_path, 88 | "-o", output_path); 89 | nob_da_append(&procs, nob_cmd_run_async_and_reset(&cmd)); 90 | } 91 | } 92 | 93 | if (!nob_procs_wait_and_reset(&procs)) nob_return_defer(false); 94 | 95 | #ifndef MUSIALIZER_HOTRELOAD 96 | const char *libraylib_path = nob_temp_sprintf("%s/libraylib.a", build_path); 97 | 98 | if (nob_needs_rebuild(libraylib_path, object_files.items, object_files.count)) { 99 | nob_cmd_append(&cmd, "ar", "-crs", libraylib_path); 100 | for (size_t i = 0; i < NOB_ARRAY_LEN(raylib_modules); ++i) { 101 | const char *input_path = nob_temp_sprintf("%s/%s.o", build_path, raylib_modules[i]); 102 | nob_cmd_append(&cmd, input_path); 103 | } 104 | if (!nob_cmd_run_sync_and_reset(&cmd)) nob_return_defer(false); 105 | } 106 | #else 107 | const char *libraylib_path = nob_temp_sprintf("%s/libraylib.so", build_path); 108 | 109 | if (nob_needs_rebuild(libraylib_path, object_files.items, object_files.count)) { 110 | nob_cmd_append(&cmd, "cc", "-shared", "-o", libraylib_path); 111 | for (size_t i = 0; i < NOB_ARRAY_LEN(raylib_modules); ++i) { 112 | const char *input_path = nob_temp_sprintf("%s/%s.o", build_path, raylib_modules[i]); 113 | nob_cmd_append(&cmd, input_path); 114 | } 115 | if (!nob_cmd_run_sync_and_reset(&cmd)) nob_return_defer(false); 116 | } 117 | #endif // MUSIALIZER_HOTRELOAD 118 | 119 | defer: 120 | nob_cmd_free(cmd); 121 | nob_da_free(object_files); 122 | return result; 123 | } 124 | 125 | bool build_dist() 126 | { 127 | #ifdef MUSIALIZER_HOTRELOAD 128 | nob_log(NOB_ERROR, "We do not ship with hotreload enabled"); 129 | return false; 130 | #else 131 | if (!nob_mkdir_if_not_exists("./musializer-linux-x86_64/")) return false; 132 | if (!nob_copy_file("./build/musializer", "./musializer-linux-x86_64/musializer")) return false; 133 | if (!nob_copy_directory_recursively("./resources/", "./musializer-linux-x86_64/resources/")) return false; 134 | // TODO: should we pack ffmpeg with Linux build? 135 | // There are some static executables for Linux 136 | Nob_Cmd cmd = {0}; 137 | nob_cmd_append(&cmd, "tar", "fvcz", "./musializer-linux-x86_64.tar.gz", "./musializer-linux-x86_64"); 138 | bool ok = nob_cmd_run_sync_and_reset(&cmd); 139 | nob_cmd_free(cmd); 140 | if (!ok) return false; 141 | 142 | return true; 143 | #endif // MUSIALIZER_HOTRELOAD 144 | } 145 | -------------------------------------------------------------------------------- /src_build/nob_win64_msvc.c: -------------------------------------------------------------------------------- 1 | #define MUSIALIZER_TARGET_NAME "win64-msvc" 2 | 3 | bool build_musializer(void) 4 | { 5 | bool result = true; 6 | Nob_Cmd cmd = {0}; 7 | Nob_Procs procs = {0}; 8 | 9 | cmd.count = 0; 10 | nob_cmd_append(&cmd, "rc"); 11 | nob_cmd_append(&cmd, "/fo", "./build/musializer.res"); 12 | nob_cmd_append(&cmd, "./src/musializer.rc"); 13 | // NOTE: Do not change the order of commandline arguments to rc. Their argparser is weird. 14 | if (!nob_cmd_run_sync(cmd)) nob_return_defer(false); 15 | #ifdef MUSIALIZER_HOTRELOAD 16 | procs.count = 0; 17 | cmd.count = 0; 18 | nob_cmd_append(&cmd, "cl.exe"); 19 | nob_cmd_append(&cmd, "/LD"); 20 | nob_cmd_append(&cmd, "/Fobuild\\", "/Fe./build/libplug.dll"); 21 | nob_cmd_append(&cmd, "/I", "./"); 22 | nob_cmd_append(&cmd, "/I", RAYLIB_SRC_FOLDER); 23 | nob_cmd_append(&cmd, 24 | "src/plug.c", 25 | "src/ffmpeg_windows.c", 26 | "./thirdparty/tinyfiledialogs.c"); 27 | nob_cmd_append(&cmd, 28 | "/link", 29 | nob_temp_sprintf("/LIBPATH:build/raylib/%s", MUSIALIZER_TARGET_NAME), 30 | "raylib.lib"); 31 | nob_cmd_append(&cmd, "Winmm.lib", "gdi32.lib", "User32.lib", "Shell32.lib", "Ole32.lib", "comdlg32.lib"); 32 | nob_da_append(&procs, nob_cmd_run_async(cmd)); 33 | 34 | cmd.count = 0; 35 | nob_cmd_append(&cmd, "cl.exe"); 36 | nob_cmd_append(&cmd, "/I", "./"); 37 | nob_cmd_append(&cmd, "/I", RAYLIB_SRC_FOLDER); 38 | nob_cmd_append(&cmd, "/Fobuild\\", "/Febuild\\musializer.exe"); 39 | nob_cmd_append(&cmd, 40 | "./src/musializer.c", 41 | "./src/hotreload_windows.c", 42 | ); 43 | nob_cmd_append(&cmd, 44 | "/link", 45 | "/SUBSYSTEM:WINDOWS", 46 | "/entry:mainCRTStartup", 47 | nob_temp_sprintf("/LIBPATH:build/raylib/%s", MUSIALIZER_TARGET_NAME), 48 | "raylib.lib"); 49 | nob_cmd_append(&cmd, "Winmm.lib", "gdi32.lib", "User32.lib", "Shell32.lib", "./build/musializer.res"); 50 | nob_da_append(&procs, nob_cmd_run_async(cmd)); 51 | if (!nob_procs_wait(procs)) nob_return_defer(false); 52 | #else 53 | cmd.count = 0; 54 | nob_cmd_append(&cmd, "cl.exe"); 55 | nob_cmd_append(&cmd, "/I", "./"); 56 | nob_cmd_append(&cmd, "/I", RAYLIB_SRC_FOLDER); 57 | nob_cmd_append(&cmd, "/Fobuild\\", "/Febuild\\musializer.exe"); 58 | nob_cmd_append(&cmd, 59 | "./src/musializer.c", 60 | "./src/plug.c", 61 | "./src/ffmpeg_windows.c", 62 | "./thirdparty/tinyfiledialogs.c"); 63 | nob_cmd_append(&cmd, 64 | "/link", 65 | "/SUBSYSTEM:WINDOWS", 66 | "/entry:mainCRTStartup", 67 | nob_temp_sprintf("/LIBPATH:build/raylib/%s", MUSIALIZER_TARGET_NAME), 68 | "raylib.lib"); 69 | nob_cmd_append(&cmd, "Winmm.lib", "gdi32.lib", "User32.lib", "Shell32.lib", "Ole32.lib", "comdlg32.lib", "./build/musializer.res"); 70 | // TODO: is some sort of `-static` flag needed for MSVC to get a statically linked executable 71 | //nob_cmd_append(&cmd, "-static"); 72 | if (!nob_cmd_run_sync(cmd)) nob_return_defer(false); 73 | #endif // MUSIALIZER_HOTRELOAD 74 | 75 | defer: 76 | nob_cmd_free(cmd); 77 | nob_da_free(procs); 78 | return result; 79 | } 80 | 81 | bool build_raylib(void) 82 | { 83 | bool result = true; 84 | Nob_Cmd cmd = {0}; 85 | Nob_File_Paths object_files = {0}; 86 | 87 | if (!nob_mkdir_if_not_exists("./build/raylib")) { 88 | nob_return_defer(false); 89 | } 90 | 91 | Nob_Procs procs = {0}; 92 | 93 | const char *build_path = nob_temp_sprintf("./build/raylib/%s", MUSIALIZER_TARGET_NAME); 94 | 95 | if (!nob_mkdir_if_not_exists(build_path)) { 96 | nob_return_defer(false); 97 | } 98 | 99 | for (size_t i = 0; i < NOB_ARRAY_LEN(raylib_modules); ++i) { 100 | const char *input_path = nob_temp_sprintf(RAYLIB_SRC_FOLDER"%s.c", raylib_modules[i]); 101 | const char *output_path = nob_temp_sprintf("%s/%s.obj", build_path, raylib_modules[i]); 102 | 103 | nob_da_append(&object_files, output_path); 104 | 105 | if (nob_needs_rebuild(output_path, &input_path, 1)) { 106 | cmd.count = 0; 107 | nob_cmd_append(&cmd, "cl.exe", "/DPLATFORM_DESKTOP", "/DSUPPORT_FILEFORMAT_FLAC=1"); 108 | #ifdef MUSIALIZER_HOTRELOAD 109 | nob_cmd_append(&cmd, "/DBUILD_LIBTYPE_SHARED"); 110 | #endif 111 | nob_cmd_append(&cmd, "/I", RAYLIB_SRC_FOLDER"external/glfw/include"); 112 | nob_cmd_append(&cmd, "/c", input_path); 113 | nob_cmd_append(&cmd, nob_temp_sprintf("/Fo%s", output_path)); 114 | Nob_Proc proc = nob_cmd_run_async(cmd); 115 | nob_da_append(&procs, proc); 116 | } 117 | } 118 | cmd.count = 0; 119 | 120 | if (!nob_procs_wait(procs)) nob_return_defer(false); 121 | #ifndef MUSIALIZER_HOTRELOAD 122 | const char *libraylib_path = nob_temp_sprintf("%s/raylib.lib", build_path); 123 | if (nob_needs_rebuild(libraylib_path, object_files.items, object_files.count)) { 124 | nob_cmd_append(&cmd, "lib"); 125 | for (size_t i = 0; i < NOB_ARRAY_LEN(raylib_modules); ++i) { 126 | const char *input_path = nob_temp_sprintf("%s/%s.obj", build_path, raylib_modules[i]); 127 | nob_cmd_append(&cmd, input_path); 128 | } 129 | nob_cmd_append(&cmd, nob_temp_sprintf("/OUT:%s", libraylib_path)); 130 | if (!nob_cmd_run_sync(cmd)) nob_return_defer(false); 131 | } 132 | #else 133 | if (nob_needs_rebuild("./build/raylib.dll", object_files.items, object_files.count)) { 134 | nob_cmd_append(&cmd, "link.exe", "/DLL"); 135 | for (size_t i = 0; i < NOB_ARRAY_LEN(raylib_modules); ++i) { 136 | const char *input_path = nob_temp_sprintf("%s/%s.obj", build_path, raylib_modules[i]); 137 | nob_cmd_append(&cmd, input_path); 138 | } 139 | nob_cmd_append(&cmd, "Winmm.lib", "gdi32.lib", "User32.lib", "Shell32.lib"); 140 | nob_cmd_append(&cmd, nob_temp_sprintf("/IMPLIB:%s/raylib.lib", build_path)); 141 | nob_cmd_append(&cmd, "/OUT:./build/raylib.dll"); 142 | if (!nob_cmd_run_sync(cmd)) nob_return_defer(false); 143 | } 144 | #endif // MUSIALIZER_HOTRELOAD 145 | 146 | defer: 147 | nob_cmd_free(cmd); 148 | nob_da_free(object_files); 149 | return result; 150 | } 151 | 152 | bool build_dist(void) 153 | { 154 | #ifdef MUSIALIZER_HOTRELOAD 155 | nob_log(NOB_ERROR, "We do not ship with hotreload enabled"); 156 | return false; 157 | #else 158 | nob_log(NOB_ERROR, "TODO: Creating distro for MSVC build is not implemented yet"); 159 | return false; 160 | #endif // MUSIALIZER_HOTRELOAD 161 | } 162 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore generated files 2 | # ... 3 | 4 | # Ignore VIM's backup generated files 5 | *.swp 6 | *.swo 7 | *~ 8 | 9 | # Ignore thumbnails created by windows 10 | Thumbs.db 11 | 12 | # Ignore files build by Visual Studio 13 | # *.obj --> Can be confused with 3d model! 14 | *.pdb 15 | *.aps 16 | *.user 17 | # *.vcproj 18 | # *.vcxproj* 19 | # *.sln 20 | *.vspscc 21 | *_i.c 22 | *.i 23 | *.icf 24 | *_p.c 25 | *.ncb 26 | *.suo 27 | *.tlb 28 | *.tlh 29 | *.bak 30 | *.cache 31 | *.ilk 32 | *.log 33 | .vs 34 | 35 | [Bb]in 36 | [Dd]ebug/ 37 | *.sbr 38 | *.sdf 39 | obj/ 40 | [R]elease/ 41 | _ReSharper*/ 42 | [Tt]est[Rr]esult* 43 | ipch/ 44 | *.opensdf 45 | *.db 46 | *.opendb 47 | packages/ 48 | !examples/models/resources/models/obj/ 49 | 50 | # Ignore compiled binaries 51 | *.o 52 | *.exe 53 | *.a 54 | *.bc 55 | *.so 56 | *.so.* 57 | *.dll 58 | 59 | # Emscripten 60 | emsdk 61 | 62 | # Ignore wasm data in examples/ 63 | examples/**/*.wasm 64 | examples/**/*.data 65 | examples/**/*.js 66 | examples/**/*.html 67 | 68 | # Ignore files build by xcode 69 | *.mode*v* 70 | *.pbxuser 71 | *.xcbkptlist 72 | *.xcscheme 73 | *.xcworkspacedata 74 | *.xcuserstate 75 | *.xccheckout 76 | xcschememanagement.plist 77 | .DS_Store 78 | ._.* 79 | xcuserdata/ 80 | DerivedData/ 81 | 82 | # VSCode project 83 | .vscode 84 | 85 | # Jetbrains project 86 | .idea/ 87 | cmake-build-*/ 88 | 89 | # CMake stuff 90 | CMakeCache.txt 91 | CMakeFiles 92 | CMakeScripts 93 | Testing 94 | cmake_install.cmake 95 | cmake_uninstall.cmake 96 | install_manifest.txt 97 | compile_commands.json 98 | CTestTestfile.cmake 99 | build 100 | 101 | # Ignore GNU global tags 102 | GPATH 103 | GRTAGS 104 | GTAGS 105 | 106 | # Zig programming language 107 | .zig-cache/ 108 | zig-cache/ 109 | zig-out/ 110 | build/ 111 | build-*/ 112 | docgen_tmp/ 113 | 114 | # Parser stuff 115 | parser/raylib_parser 116 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2024 Ramon Santamaria (@raysan5) 2 | 3 | This software is provided "as-is", without any express or implied warranty. In no event 4 | will the authors be held liable for any damages arising from the use of this software. 5 | 6 | Permission is granted to anyone to use this software for any purpose, including commercial 7 | applications, and to alter it and redistribute it freely, subject to the following restrictions: 8 | 9 | 1. The origin of this software must not be misrepresented; you must not claim that you 10 | wrote the original software. If you use this software in a product, an acknowledgment 11 | in the product documentation would be appreciated but is not required. 12 | 13 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented 14 | as being the original software. 15 | 16 | 3. This notice may not be removed or altered from any source distribution. 17 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/README: -------------------------------------------------------------------------------- 1 | Original Raylib 5.5 Source Code downloaded from https://github.com/raysan5/raylib/releases/tag/5.0 2 | Stripped off everything except `./LICENSE` and `./src/`. 3 | 4 | - rexim 5 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Setup the project and settings 2 | project(raylib C) 3 | set(PROJECT_VERSION 5.5.0) 4 | set(API_VERSION 550) 5 | 6 | include(GNUInstallDirs) 7 | include(JoinPaths) 8 | 9 | # Sets build type if not set by now 10 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 11 | if(RAYLIB_IS_MAIN) 12 | set(default_build_type Debug) 13 | else() 14 | message(WARNING "Default build type is not set (CMAKE_BUILD_TYPE)") 15 | endif() 16 | 17 | message(STATUS "Setting build type to '${default_build_type}' as none was specified.") 18 | 19 | set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type of build." FORCE) 20 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") 21 | endif() 22 | 23 | # Used as public API to be included into other projects 24 | set(raylib_public_headers 25 | raylib.h 26 | rlgl.h 27 | raymath.h 28 | ) 29 | 30 | # Sources to be compiled 31 | set(raylib_sources 32 | raudio.c 33 | rcore.c 34 | rmodels.c 35 | rshapes.c 36 | rtext.c 37 | rtextures.c 38 | utils.c 39 | ) 40 | 41 | # /cmake/GlfwImport.cmake handles the details around the inclusion of glfw 42 | if (NOT ${PLATFORM} MATCHES "Web") 43 | include(GlfwImport) 44 | endif () 45 | 46 | # Sets additional platform options and link libraries for each platform 47 | # also selects the proper graphics API and version for that platform 48 | # Produces a variable LIBS_PRIVATE that will be used later 49 | include(LibraryConfigurations) 50 | 51 | if (SUPPORT_MODULE_RAUDIO) 52 | MESSAGE(STATUS "Audio Backend: miniaudio") 53 | else () 54 | MESSAGE(STATUS "Audio Backend: None (-DCUSTOMIZE_BUILD=ON -DSUPPORT_MODULE_RAUDIO=OFF)") 55 | endif () 56 | 57 | add_library(raylib ${raylib_sources} ${raylib_public_headers}) 58 | 59 | if (NOT BUILD_SHARED_LIBS) 60 | MESSAGE(STATUS "Building raylib static library") 61 | add_library(raylib_static ALIAS raylib) 62 | else() 63 | MESSAGE(STATUS "Building raylib shared library") 64 | target_compile_definitions(raylib 65 | PRIVATE $ 66 | INTERFACE $ 67 | ) 68 | endif() 69 | 70 | if (${PLATFORM} MATCHES "Web") 71 | target_link_options(raylib PUBLIC "-sUSE_GLFW=3") 72 | if(${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_ES3") 73 | target_link_options(raylib PUBLIC "-sMIN_WEBGL_VERSION=2") 74 | target_link_options(raylib PUBLIC "-sMAX_WEBGL_VERSION=2") 75 | endif() 76 | endif() 77 | 78 | set_target_properties(raylib PROPERTIES 79 | PUBLIC_HEADER "${raylib_public_headers}" 80 | VERSION ${PROJECT_VERSION} 81 | SOVERSION ${API_VERSION} 82 | ) 83 | 84 | if (WITH_PIC OR BUILD_SHARED_LIBS) 85 | set_property(TARGET raylib PROPERTY POSITION_INDEPENDENT_CODE ON) 86 | endif () 87 | 88 | if (BUILD_SHARED_LIBS) 89 | # Hide raylib's symbols by default so RLAPI can expose them 90 | set_property(TARGET raylib PROPERTY C_VISIBILITY_PRESET hidden) 91 | endif () 92 | 93 | target_link_libraries(raylib "${LIBS_PRIVATE}") 94 | 95 | # Sets some compile time definitions for the pre-processor 96 | # If CUSTOMIZE_BUILD option is on you will not use config.h by default 97 | # and you will be able to select more build options 98 | include(CompileDefinitions) 99 | 100 | # Registering include directories 101 | target_include_directories(raylib 102 | PUBLIC 103 | $ 104 | $ 105 | PRIVATE 106 | ${CMAKE_CURRENT_SOURCE_DIR} 107 | ${OPENGL_INCLUDE_DIR} 108 | ${OPENAL_INCLUDE_DIR} 109 | ) 110 | 111 | # Copy the header files to the build directory for convenience 112 | file(COPY ${raylib_public_headers} DESTINATION "include") 113 | 114 | # Includes information on how the library will be installed on the system 115 | # when cmake --install is run 116 | include(InstallConfigurations) 117 | 118 | # Print the flags for the user 119 | if (DEFINED CMAKE_BUILD_TYPE) 120 | message(STATUS "Generated build type: ${CMAKE_BUILD_TYPE}") 121 | else () 122 | message(STATUS "Generated config types: ${CMAKE_CONFIGURATION_TYPES}") 123 | endif () 124 | 125 | message(STATUS "Compiling with the flags:") 126 | message(STATUS " PLATFORM=" ${PLATFORM_CPP}) 127 | message(STATUS " GRAPHICS=" ${GRAPHICS}) 128 | 129 | # Options if you want to create an installer using CPack 130 | include(PackConfigurations) 131 | 132 | enable_testing() 133 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/dirent.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | 3 | Declaration of POSIX directory browsing functions and types for Win32. 4 | 5 | Author: Kevlin Henney (kevlin@acm.org, kevlin@curbralan.com) 6 | History: Created March 1997. Updated June 2003. 7 | Reviewed by Ramon Santamaria for raylib on January 2020. 8 | 9 | Copyright Kevlin Henney, 1997, 2003. All rights reserved. 10 | 11 | Permission to use, copy, modify, and distribute this software and its 12 | documentation for any purpose is hereby granted without fee, provided 13 | that this copyright and permissions notice appear in all copies and 14 | derivatives. 15 | 16 | This software is supplied "as is" without express or implied warranty. 17 | 18 | But that said, if there are any problems please get in touch. 19 | 20 | ****************************************************************************/ 21 | 22 | #ifndef DIRENT_H 23 | #define DIRENT_H 24 | 25 | // Allow custom memory allocators 26 | #ifndef DIRENT_MALLOC 27 | #define DIRENT_MALLOC(sz) malloc(sz) 28 | #endif 29 | #ifndef DIRENT_FREE 30 | #define DIRENT_FREE(p) free(p) 31 | #endif 32 | 33 | //---------------------------------------------------------------------------------- 34 | // Types and Structures Definition 35 | //---------------------------------------------------------------------------------- 36 | 37 | // Fordward declaration of DIR, implementation below 38 | typedef struct DIR DIR; 39 | 40 | struct dirent { 41 | char *d_name; 42 | }; 43 | 44 | #ifdef __cplusplus 45 | extern "C" { 46 | #endif 47 | 48 | //------------------------------------------------------------------------------------ 49 | // Functions Declaration 50 | //------------------------------------------------------------------------------------ 51 | DIR *opendir(const char *name); 52 | int closedir(DIR *dir); 53 | struct dirent *readdir(DIR *dir); 54 | void rewinddir(DIR *dir); 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif // DIRENT_H 61 | 62 | /**************************************************************************** 63 | 64 | Implementation of POSIX directory browsing functions and types for Win32. 65 | 66 | Author: Kevlin Henney (kevlin@acm.org, kevlin@curbralan.com) 67 | History: Created March 1997. Updated June 2003. 68 | Reviewed by Ramon Santamaria for raylib on January 2020. 69 | 70 | Copyright Kevlin Henney, 1997, 2003. All rights reserved. 71 | 72 | Permission to use, copy, modify, and distribute this software and its 73 | documentation for any purpose is hereby granted without fee, provided 74 | that this copyright and permissions notice appear in all copies and 75 | derivatives. 76 | 77 | This software is supplied "as is" without express or implied warranty. 78 | 79 | But that said, if there are any problems please get in touch. 80 | 81 | ****************************************************************************/ 82 | 83 | #include // _findfirst and _findnext set errno iff they return -1 84 | #include 85 | #include 86 | #include 87 | 88 | //---------------------------------------------------------------------------------- 89 | // Types and Structures Definition 90 | //---------------------------------------------------------------------------------- 91 | typedef ptrdiff_t handle_type; // C99's intptr_t not sufficiently portable 92 | 93 | struct DIR { 94 | handle_type handle; // -1 for failed rewind 95 | struct _finddata_t info; 96 | struct dirent result; // d_name null iff first time 97 | char *name; // null-terminated char string 98 | }; 99 | 100 | DIR *opendir(const char *name) 101 | { 102 | DIR *dir = 0; 103 | 104 | if (name && name[0]) 105 | { 106 | size_t base_length = strlen(name); 107 | 108 | // Search pattern must end with suitable wildcard 109 | const char *all = strchr("/\\", name[base_length - 1]) ? "*" : "/*"; 110 | 111 | if ((dir = (DIR *)DIRENT_MALLOC(sizeof *dir)) != 0 && 112 | (dir->name = (char *)DIRENT_MALLOC(base_length + strlen(all) + 1)) != 0) 113 | { 114 | strcat(strcpy(dir->name, name), all); 115 | 116 | if ((dir->handle = (handle_type) _findfirst(dir->name, &dir->info)) != -1) 117 | { 118 | dir->result.d_name = 0; 119 | } 120 | else // rollback 121 | { 122 | DIRENT_FREE(dir->name); 123 | DIRENT_FREE(dir); 124 | dir = 0; 125 | } 126 | } 127 | else // rollback 128 | { 129 | DIRENT_FREE(dir); 130 | dir = 0; 131 | errno = ENOMEM; 132 | } 133 | } 134 | else errno = EINVAL; 135 | 136 | return dir; 137 | } 138 | 139 | int closedir(DIR *dir) 140 | { 141 | int result = -1; 142 | 143 | if (dir) 144 | { 145 | if (dir->handle != -1) result = _findclose(dir->handle); 146 | 147 | DIRENT_FREE(dir->name); 148 | DIRENT_FREE(dir); 149 | } 150 | 151 | // NOTE: All errors ampped to EBADF 152 | if (result == -1) errno = EBADF; 153 | 154 | return result; 155 | } 156 | 157 | struct dirent *readdir(DIR *dir) 158 | { 159 | struct dirent *result = 0; 160 | 161 | if (dir && dir->handle != -1) 162 | { 163 | if (!dir->result.d_name || _findnext(dir->handle, &dir->info) != -1) 164 | { 165 | result = &dir->result; 166 | result->d_name = dir->info.name; 167 | } 168 | } 169 | else errno = EBADF; 170 | 171 | return result; 172 | } 173 | 174 | void rewinddir(DIR *dir) 175 | { 176 | if (dir && dir->handle != -1) 177 | { 178 | _findclose(dir->handle); 179 | dir->handle = (handle_type) _findfirst(dir->name, &dir->info); 180 | dir->result.d_name = 0; 181 | } 182 | else errno = EBADF; 183 | } 184 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/.mailmap: -------------------------------------------------------------------------------- 1 | Camilla Löwy 2 | Camilla Löwy 3 | Camilla Löwy 4 | 5 | Emmanuel Gil Peyrot 6 | 7 | Marcus Geelnard 8 | Marcus Geelnard 9 | Marcus Geelnard 10 | 11 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/CMake/GenerateMappings.cmake: -------------------------------------------------------------------------------- 1 | # Usage: 2 | # cmake -P GenerateMappings.cmake 3 | 4 | set(source_url "https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt") 5 | set(source_path "${CMAKE_CURRENT_BINARY_DIR}/gamecontrollerdb.txt") 6 | set(template_path "${CMAKE_ARGV3}") 7 | set(target_path "${CMAKE_ARGV4}") 8 | 9 | if (NOT EXISTS "${template_path}") 10 | message(FATAL_ERROR "Failed to find template file ${template_path}") 11 | endif() 12 | 13 | file(DOWNLOAD "${source_url}" "${source_path}" 14 | STATUS download_status 15 | TLS_VERIFY on) 16 | 17 | list(GET download_status 0 status_code) 18 | list(GET download_status 1 status_message) 19 | 20 | if (status_code) 21 | message(FATAL_ERROR "Failed to download ${source_url}: ${status_message}") 22 | endif() 23 | 24 | file(STRINGS "${source_path}" lines) 25 | foreach(line ${lines}) 26 | if (line MATCHES "^[0-9a-fA-F]") 27 | if (line MATCHES "platform:Windows") 28 | if (GLFW_WIN32_MAPPINGS) 29 | string(APPEND GLFW_WIN32_MAPPINGS "\n") 30 | endif() 31 | string(APPEND GLFW_WIN32_MAPPINGS "\"${line}\",") 32 | elseif (line MATCHES "platform:Mac OS X") 33 | if (GLFW_COCOA_MAPPINGS) 34 | string(APPEND GLFW_COCOA_MAPPINGS "\n") 35 | endif() 36 | string(APPEND GLFW_COCOA_MAPPINGS "\"${line}\",") 37 | elseif (line MATCHES "platform:Linux") 38 | if (GLFW_LINUX_MAPPINGS) 39 | string(APPEND GLFW_LINUX_MAPPINGS "\n") 40 | endif() 41 | string(APPEND GLFW_LINUX_MAPPINGS "\"${line}\",") 42 | endif() 43 | endif() 44 | endforeach() 45 | 46 | configure_file("${template_path}" "${target_path}" @ONLY NEWLINE_STYLE UNIX) 47 | file(REMOVE "${source_path}") 48 | 49 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/CMake/Info.plist.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${MACOSX_BUNDLE_EXECUTABLE_NAME} 9 | CFBundleGetInfoString 10 | ${MACOSX_BUNDLE_INFO_STRING} 11 | CFBundleIconFile 12 | ${MACOSX_BUNDLE_ICON_FILE} 13 | CFBundleIdentifier 14 | ${MACOSX_BUNDLE_GUI_IDENTIFIER} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleLongVersionString 18 | ${MACOSX_BUNDLE_LONG_VERSION_STRING} 19 | CFBundleName 20 | ${MACOSX_BUNDLE_BUNDLE_NAME} 21 | CFBundlePackageType 22 | APPL 23 | CFBundleShortVersionString 24 | ${MACOSX_BUNDLE_SHORT_VERSION_STRING} 25 | CFBundleSignature 26 | ???? 27 | CFBundleVersion 28 | ${MACOSX_BUNDLE_BUNDLE_VERSION} 29 | CSResourcesFileMapped 30 | 31 | LSRequiresCarbon 32 | 33 | NSHumanReadableCopyright 34 | ${MACOSX_BUNDLE_COPYRIGHT} 35 | NSHighResolutionCapable 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/CMake/cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | 2 | if (NOT EXISTS "@GLFW_BINARY_DIR@/install_manifest.txt") 3 | message(FATAL_ERROR "Cannot find install manifest: \"@GLFW_BINARY_DIR@/install_manifest.txt\"") 4 | endif() 5 | 6 | file(READ "@GLFW_BINARY_DIR@/install_manifest.txt" files) 7 | string(REGEX REPLACE "\n" ";" files "${files}") 8 | 9 | foreach (file ${files}) 10 | message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") 11 | if (EXISTS "$ENV{DESTDIR}${file}") 12 | exec_program("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 13 | OUTPUT_VARIABLE rm_out 14 | RETURN_VALUE rm_retval) 15 | if (NOT "${rm_retval}" STREQUAL 0) 16 | MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") 17 | endif() 18 | elseif (IS_SYMLINK "$ENV{DESTDIR}${file}") 19 | EXEC_PROGRAM("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 20 | OUTPUT_VARIABLE rm_out 21 | RETURN_VALUE rm_retval) 22 | if (NOT "${rm_retval}" STREQUAL 0) 23 | message(FATAL_ERROR "Problem when removing symlink \"$ENV{DESTDIR}${file}\"") 24 | endif() 25 | else() 26 | message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") 27 | endif() 28 | endforeach() 29 | 30 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/CMake/glfw3.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 4 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 5 | 6 | Name: GLFW 7 | Description: A multi-platform library for OpenGL, window and input 8 | Version: @GLFW_VERSION@ 9 | URL: https://www.glfw.org/ 10 | Requires.private: @GLFW_PKG_CONFIG_REQUIRES_PRIVATE@ 11 | Libs: -L${libdir} -l@GLFW_LIB_NAME@@GLFW_LIB_NAME_SUFFIX@ 12 | Libs.private: @GLFW_PKG_CONFIG_LIBS_PRIVATE@ 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/CMake/glfw3Config.cmake.in: -------------------------------------------------------------------------------- 1 | include(CMakeFindDependencyMacro) 2 | find_dependency(Threads) 3 | include("${CMAKE_CURRENT_LIST_DIR}/glfw3Targets.cmake") 4 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/CMake/i686-w64-mingw32-clang.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross-compiling with 32-bit MinGW-w64 Clang 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "i686-w64-mingw32-clang") 5 | SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-clang++") 6 | SET(CMAKE_RC_COMPILER "i686-w64-mingw32-windres") 7 | SET(CMAKE_RANLIB "i686-w64-mingw32-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/CMake/i686-w64-mingw32.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross-compiling with 32-bit MinGW-w64 GCC 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "i686-w64-mingw32-gcc") 5 | SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-g++") 6 | SET(CMAKE_RC_COMPILER "i686-w64-mingw32-windres") 7 | SET(CMAKE_RANLIB "i686-w64-mingw32-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/CMake/modules/FindEpollShim.cmake: -------------------------------------------------------------------------------- 1 | # Find EpollShim 2 | # Once done, this will define 3 | # 4 | # EPOLLSHIM_FOUND - System has EpollShim 5 | # EPOLLSHIM_INCLUDE_DIRS - The EpollShim include directories 6 | # EPOLLSHIM_LIBRARIES - The libraries needed to use EpollShim 7 | 8 | find_path(EPOLLSHIM_INCLUDE_DIRS NAMES sys/epoll.h sys/timerfd.h HINTS /usr/local/include/libepoll-shim) 9 | find_library(EPOLLSHIM_LIBRARIES NAMES epoll-shim libepoll-shim HINTS /usr/local/lib) 10 | 11 | if (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES) 12 | set(EPOLLSHIM_FOUND TRUE) 13 | endif (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES) 14 | 15 | include(FindPackageHandleStandardArgs) 16 | find_package_handle_standard_args(EpollShim DEFAULT_MSG EPOLLSHIM_LIBRARIES EPOLLSHIM_INCLUDE_DIRS) 17 | mark_as_advanced(EPOLLSHIM_INCLUDE_DIRS EPOLLSHIM_LIBRARIES) 18 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/CMake/modules/FindOSMesa.cmake: -------------------------------------------------------------------------------- 1 | # Try to find OSMesa on a Unix system 2 | # 3 | # This will define: 4 | # 5 | # OSMESA_LIBRARIES - Link these to use OSMesa 6 | # OSMESA_INCLUDE_DIR - Include directory for OSMesa 7 | # 8 | # Copyright (c) 2014 Brandon Schaefer 9 | 10 | if (NOT WIN32) 11 | 12 | find_package (PkgConfig) 13 | pkg_check_modules (PKG_OSMESA QUIET osmesa) 14 | 15 | set (OSMESA_INCLUDE_DIR ${PKG_OSMESA_INCLUDE_DIRS}) 16 | set (OSMESA_LIBRARIES ${PKG_OSMESA_LIBRARIES}) 17 | 18 | endif () 19 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/CMake/x86_64-w64-mingw32-clang.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross-compiling with 64-bit MinGW-w64 Clang 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "x86_64-w64-mingw32-clang") 5 | SET(CMAKE_CXX_COMPILER "x86_64-w64-mingw32-clang++") 6 | SET(CMAKE_RC_COMPILER "x86_64-w64-mingw32-windres") 7 | SET(CMAKE_RANLIB "x86_64-w64-mingw32-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/x86_64-w64-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/CMake/x86_64-w64-mingw32.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross-compiling with 64-bit MinGW-w64 GCC 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "x86_64-w64-mingw32-gcc") 5 | SET(CMAKE_CXX_COMPILER "x86_64-w64-mingw32-g++") 6 | SET(CMAKE_RC_COMPILER "x86_64-w64-mingw32-windres") 7 | SET(CMAKE_RANLIB "x86_64-w64-mingw32-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/x86_64-w64-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.4...3.28 FATAL_ERROR) 2 | 3 | project(GLFW VERSION 3.4.0 LANGUAGES C) 4 | 5 | if (POLICY CMP0069) 6 | cmake_policy(SET CMP0069 NEW) 7 | endif() 8 | 9 | if (POLICY CMP0077) 10 | cmake_policy(SET CMP0077 NEW) 11 | endif() 12 | 13 | set_property(GLOBAL PROPERTY USE_FOLDERS ON) 14 | 15 | string(COMPARE EQUAL "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}" GLFW_STANDALONE) 16 | 17 | option(BUILD_SHARED_LIBS "Build shared libraries" OFF) 18 | option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" ${GLFW_STANDALONE}) 19 | option(GLFW_BUILD_TESTS "Build the GLFW test programs" ${GLFW_STANDALONE}) 20 | option(GLFW_BUILD_DOCS "Build the GLFW documentation" ON) 21 | option(GLFW_INSTALL "Generate installation target" ON) 22 | 23 | include(GNUInstallDirs) 24 | include(CMakeDependentOption) 25 | 26 | if (GLFW_USE_OSMESA) 27 | message(FATAL_ERROR "GLFW_USE_OSMESA has been removed; set the GLFW_PLATFORM init hint") 28 | endif() 29 | 30 | if (DEFINED GLFW_USE_WAYLAND AND UNIX AND NOT APPLE) 31 | message(FATAL_ERROR 32 | "GLFW_USE_WAYLAND has been removed; delete the CMake cache and set GLFW_BUILD_WAYLAND and GLFW_BUILD_X11 instead") 33 | endif() 34 | 35 | cmake_dependent_option(GLFW_BUILD_WIN32 "Build support for Win32" ON "WIN32" OFF) 36 | cmake_dependent_option(GLFW_BUILD_COCOA "Build support for Cocoa" ON "APPLE" OFF) 37 | cmake_dependent_option(GLFW_BUILD_X11 "Build support for X11" ON "UNIX;NOT APPLE" OFF) 38 | cmake_dependent_option(GLFW_BUILD_WAYLAND "Build support for Wayland" ON "UNIX;NOT APPLE" OFF) 39 | 40 | cmake_dependent_option(GLFW_USE_HYBRID_HPG "Force use of high-performance GPU on hybrid systems" OFF 41 | "WIN32" OFF) 42 | cmake_dependent_option(USE_MSVC_RUNTIME_LIBRARY_DLL "Use MSVC runtime library DLL" ON 43 | "MSVC" OFF) 44 | 45 | set(GLFW_LIBRARY_TYPE "${GLFW_LIBRARY_TYPE}" CACHE STRING 46 | "Library type override for GLFW (SHARED, STATIC, OBJECT, or empty to follow BUILD_SHARED_LIBS)") 47 | 48 | if (GLFW_LIBRARY_TYPE) 49 | if (GLFW_LIBRARY_TYPE STREQUAL "SHARED") 50 | set(GLFW_BUILD_SHARED_LIBRARY TRUE) 51 | else() 52 | set(GLFW_BUILD_SHARED_LIBRARY FALSE) 53 | endif() 54 | else() 55 | set(GLFW_BUILD_SHARED_LIBRARY ${BUILD_SHARED_LIBS}) 56 | endif() 57 | 58 | list(APPEND CMAKE_MODULE_PATH "${GLFW_SOURCE_DIR}/CMake/modules") 59 | 60 | find_package(Threads REQUIRED) 61 | 62 | #-------------------------------------------------------------------- 63 | # Report backend selection 64 | #-------------------------------------------------------------------- 65 | if (GLFW_BUILD_WIN32) 66 | message(STATUS "Including Win32 support") 67 | endif() 68 | if (GLFW_BUILD_COCOA) 69 | message(STATUS "Including Cocoa support") 70 | endif() 71 | if (GLFW_BUILD_WAYLAND) 72 | message(STATUS "Including Wayland support") 73 | endif() 74 | if (GLFW_BUILD_X11) 75 | message(STATUS "Including X11 support") 76 | endif() 77 | 78 | #-------------------------------------------------------------------- 79 | # Apply Microsoft C runtime library option 80 | # This is here because it also applies to tests and examples 81 | #-------------------------------------------------------------------- 82 | if (MSVC AND NOT USE_MSVC_RUNTIME_LIBRARY_DLL) 83 | if (CMAKE_VERSION VERSION_LESS 3.15) 84 | foreach (flag CMAKE_C_FLAGS 85 | CMAKE_C_FLAGS_DEBUG 86 | CMAKE_C_FLAGS_RELEASE 87 | CMAKE_C_FLAGS_MINSIZEREL 88 | CMAKE_C_FLAGS_RELWITHDEBINFO) 89 | 90 | if (flag MATCHES "/MD") 91 | string(REGEX REPLACE "/MD" "/MT" ${flag} "${${flag}}") 92 | endif() 93 | if (flag MATCHES "/MDd") 94 | string(REGEX REPLACE "/MDd" "/MTd" ${flag} "${${flag}}") 95 | endif() 96 | 97 | endforeach() 98 | else() 99 | set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") 100 | endif() 101 | endif() 102 | 103 | #-------------------------------------------------------------------- 104 | # Create generated files 105 | #-------------------------------------------------------------------- 106 | include(CMakePackageConfigHelpers) 107 | 108 | set(GLFW_CONFIG_PATH "${CMAKE_INSTALL_LIBDIR}/cmake/glfw3") 109 | 110 | configure_package_config_file(CMake/glfw3Config.cmake.in 111 | src/glfw3Config.cmake 112 | INSTALL_DESTINATION "${GLFW_CONFIG_PATH}" 113 | NO_CHECK_REQUIRED_COMPONENTS_MACRO) 114 | 115 | write_basic_package_version_file(src/glfw3ConfigVersion.cmake 116 | VERSION ${GLFW_VERSION} 117 | COMPATIBILITY SameMajorVersion) 118 | 119 | #-------------------------------------------------------------------- 120 | # Add subdirectories 121 | #-------------------------------------------------------------------- 122 | add_subdirectory(src) 123 | 124 | if (GLFW_BUILD_EXAMPLES) 125 | add_subdirectory(examples) 126 | endif() 127 | 128 | if (GLFW_BUILD_TESTS) 129 | add_subdirectory(tests) 130 | endif() 131 | 132 | if (GLFW_BUILD_DOCS) 133 | add_subdirectory(docs) 134 | endif() 135 | 136 | #-------------------------------------------------------------------- 137 | # Install files other than the library 138 | # The library is installed by src/CMakeLists.txt 139 | #-------------------------------------------------------------------- 140 | if (GLFW_INSTALL) 141 | install(DIRECTORY include/GLFW DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 142 | FILES_MATCHING PATTERN glfw3.h PATTERN glfw3native.h) 143 | 144 | install(FILES "${GLFW_BINARY_DIR}/src/glfw3Config.cmake" 145 | "${GLFW_BINARY_DIR}/src/glfw3ConfigVersion.cmake" 146 | DESTINATION "${GLFW_CONFIG_PATH}") 147 | 148 | install(EXPORT glfwTargets FILE glfw3Targets.cmake 149 | EXPORT_LINK_INTERFACE_LIBRARIES 150 | DESTINATION "${GLFW_CONFIG_PATH}") 151 | install(FILES "${GLFW_BINARY_DIR}/src/glfw3.pc" 152 | DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") 153 | 154 | # Only generate this target if no higher-level project already has 155 | if (NOT TARGET uninstall) 156 | configure_file(CMake/cmake_uninstall.cmake.in 157 | cmake_uninstall.cmake IMMEDIATE @ONLY) 158 | 159 | add_custom_target(uninstall 160 | "${CMAKE_COMMAND}" -P 161 | "${GLFW_BINARY_DIR}/cmake_uninstall.cmake") 162 | set_target_properties(uninstall PROPERTIES FOLDER "GLFW3") 163 | endif() 164 | endif() 165 | 166 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | 3 | GLFW exists because people around the world donated their time and lent their 4 | skills. This list only includes contributions to the main repository and 5 | excludes other invaluable contributions like language bindings and text and 6 | video tutorials. 7 | 8 | - Bobyshev Alexander 9 | - Laurent Aphecetche 10 | - Matt Arsenault 11 | - Takuro Ashie 12 | - ashishgamedev 13 | - David Avedissian 14 | - Luca Bacci 15 | - Keith Bauer 16 | - John Bartholomew 17 | - Coşku Baş 18 | - Bayemite 19 | - Niklas Behrens 20 | - Andrew Belt 21 | - Nevyn Bengtsson 22 | - Niklas Bergström 23 | - Denis Bernard 24 | - BiBi 25 | - Doug Binks 26 | - blanco 27 | - Waris Boonyasiriwat 28 | - Kyle Brenneman 29 | - Rok Breulj 30 | - TheBrokenRail 31 | - Kai Burjack 32 | - Martin Capitanio 33 | - Nicolas Caramelli 34 | - David Carlier 35 | - Arturo Castro 36 | - Chi-kwan Chan 37 | - Victor Chernyakin 38 | - TheChocolateOre 39 | - Ali Chraghi 40 | - Joseph Chua 41 | - Ian Clarkson 42 | - Michał Cichoń 43 | - Lambert Clara 44 | - Anna Clarke 45 | - Josh Codd 46 | - Yaron Cohen-Tal 47 | - Omar Cornut 48 | - Andrew Corrigan 49 | - Bailey Cosier 50 | - Noel Cower 51 | - CuriouserThing 52 | - Bill Currie 53 | - Jason Daly 54 | - danhambleton 55 | - Jarrod Davis 56 | - Olivier Delannoy 57 | - Paul R. Deppe 58 | - Michael Dickens 59 | - Роман Донченко 60 | - Mario Dorn 61 | - Wolfgang Draxinger 62 | - Jonathan Dummer 63 | - Ralph Eastwood 64 | - Fredrik Ehnbom 65 | - Robin Eklind 66 | - Jan Ekström 67 | - Siavash Eliasi 68 | - Ahmad Fatoum 69 | - Nikita Fediuchin 70 | - Felipe Ferreira 71 | - Michael Fogleman 72 | - forworldm 73 | - Jason Francis 74 | - Gerald Franz 75 | - Mário Freitas 76 | - GeO4d 77 | - Marcus Geelnard 78 | - Gegy 79 | - ghuser404 80 | - Charles Giessen 81 | - Ryan C. Gordon 82 | - Stephen Gowen 83 | - Kovid Goyal 84 | - Kevin Grandemange 85 | - Eloi Marín Gratacós 86 | - Grzesiek11 87 | - Stefan Gustavson 88 | - Andrew Gutekanst 89 | - Stephen Gutekanst 90 | - Jonathan Hale 91 | - Daniel Hauser 92 | - hdf89shfdfs 93 | - Moritz Heinemann 94 | - Sylvain Hellegouarch 95 | - Björn Hempel 96 | - Matthew Henry 97 | - heromyth 98 | - Lucas Hinderberger 99 | - Paul Holden 100 | - Hajime Hoshi 101 | - Warren Hu 102 | - Charles Huber 103 | - Brent Huisman 104 | - Florian Hülsmann 105 | - illustris 106 | - InKryption 107 | - IntellectualKitty 108 | - Aaron Jacobs 109 | - JannikGM 110 | - Erik S. V. Jansson 111 | - jjYBdx4IL 112 | - Peter Johnson 113 | - Toni Jovanoski 114 | - Arseny Kapoulkine 115 | - Cem Karan 116 | - Osman Keskin 117 | - Koray Kilinc 118 | - Josh Kilmer 119 | - Byunghoon Kim 120 | - Cameron King 121 | - Peter Knut 122 | - Christoph Kubisch 123 | - Yuri Kunde Schlesner 124 | - Rokas Kupstys 125 | - Konstantin Käfer 126 | - Eric Larson 127 | - Guillaume Lebrun 128 | - Francis Lecavalier 129 | - Jong Won Lee 130 | - Robin Leffmann 131 | - Glenn Lewis 132 | - Shane Liesegang 133 | - Anders Lindqvist 134 | - Leon Linhart 135 | - Marco Lizza 136 | - lo-v-ol 137 | - Eyal Lotem 138 | - Aaron Loucks 139 | - Ned Loynd 140 | - Luflosi 141 | - lukect 142 | - Tristam MacDonald 143 | - Jean-Luc Mackail 144 | - Hans Mackowiak 145 | - Ramiro Magno 146 | - Дмитри Малышев 147 | - Zbigniew Mandziejewicz 148 | - Adam Marcus 149 | - Célestin Marot 150 | - Kyle McDonald 151 | - David V. McKay 152 | - David Medlock 153 | - Bryce Mehring 154 | - Jonathan Mercier 155 | - Marcel Metz 156 | - Liam Middlebrook 157 | - mightgoyardstill 158 | - Ave Milia 159 | - Icyllis Milica 160 | - Jonathan Miller 161 | - Kenneth Miller 162 | - Bruce Mitchener 163 | - Jack Moffitt 164 | - Ravi Mohan 165 | - Jeff Molofee 166 | - Alexander Monakov 167 | - Pierre Morel 168 | - Jon Morton 169 | - Pierre Moulon 170 | - Martins Mozeiko 171 | - Pascal Muetschard 172 | - James Murphy 173 | - Julian Møller 174 | - Julius Häger 175 | - Nat! 176 | - NateIsStalling 177 | - ndogxj 178 | - F. Nedelec 179 | - n3rdopolis 180 | - Kristian Nielsen 181 | - Joel Niemelä 182 | - Victor Nova 183 | - Kamil Nowakowski 184 | - onox 185 | - Denis Ovod 186 | - Ozzy 187 | - Andri Pálsson 188 | - luz paz 189 | - Peoro 190 | - Braden Pellett 191 | - Christopher Pelloux 192 | - Michael Pennington 193 | - Arturo J. Pérez 194 | - Vladimir Perminov 195 | - Olivier Perret 196 | - Anthony Pesch 197 | - Orson Peters 198 | - Emmanuel Gil Peyrot 199 | - Cyril Pichard 200 | - Pilzschaf 201 | - Keith Pitt 202 | - Stanislav Podgorskiy 203 | - Konstantin Podsvirov 204 | - Nathan Poirier 205 | - Pokechu22 206 | - Alexandre Pretyman 207 | - Pablo Prietz 208 | - przemekmirek 209 | - pthom 210 | - Martin Pulec 211 | - Guillaume Racicot 212 | - Juan Ramos 213 | - Christian Rauch 214 | - Philip Rideout 215 | - Eddie Ringle 216 | - Max Risuhin 217 | - Joe Roback 218 | - Jorge Rodriguez 219 | - Jari Ronkainen 220 | - Luca Rood 221 | - Ed Ropple 222 | - Aleksey Rybalkin 223 | - Mikko Rytkönen 224 | - Riku Salminen 225 | - Yoshinori Sano 226 | - Brandon Schaefer 227 | - Sebastian Schuberth 228 | - Scr3amer 229 | - Jan Schuerkamp 230 | - Christian Sdunek 231 | - Matt Sealey 232 | - Steve Sexton 233 | - Arkady Shapkin 234 | - Mingjie Shen 235 | - Ali Sherief 236 | - Yoshiki Shibukawa 237 | - Dmitri Shuralyov 238 | - Joao da Silva 239 | - Daniel Sieger 240 | - Daljit Singh 241 | - Michael Skec 242 | - Daniel Skorupski 243 | - Slemmie 244 | - Anthony Smith 245 | - Bradley Smith 246 | - Cliff Smolinsky 247 | - Patrick Snape 248 | - Erlend Sogge Heggen 249 | - Olivier Sohn 250 | - Julian Squires 251 | - Johannes Stein 252 | - Pontus Stenetorp 253 | - Michael Stocker 254 | - Justin Stoecker 255 | - Elviss Strazdins 256 | - Paul Sultana 257 | - Nathan Sweet 258 | - TTK-Bandit 259 | - Nuno Teixeira 260 | - Jared Tiala 261 | - Sergey Tikhomirov 262 | - Arthur Tombs 263 | - TronicLabs 264 | - Ioannis Tsakpinis 265 | - Samuli Tuomola 266 | - Matthew Turner 267 | - urraka 268 | - Elias Vanderstuyft 269 | - Stef Velzel 270 | - Jari Vetoniemi 271 | - Ricardo Vieira 272 | - Nicholas Vitovitch 273 | - Vladimír Vondruš 274 | - Simon Voordouw 275 | - Corentin Wallez 276 | - Torsten Walluhn 277 | - Patrick Walton 278 | - Jim Wang 279 | - Xo Wang 280 | - Andre Weissflog 281 | - Jay Weisskopf 282 | - Frank Wille 283 | - Andy Williams 284 | - Joel Winarske 285 | - Richard A. Wilkes 286 | - Tatsuya Yatagawa 287 | - Ryogo Yoshimura 288 | - Lukas Zanner 289 | - Andrey Zholos 290 | - Aihui Zhu 291 | - Santi Zupancic 292 | - Jonas Ådahl 293 | - Lasse Öörni 294 | - Leonard König 295 | - All the unmentioned and anonymous contributors in the GLFW community, for bug 296 | reports, patches, feedback, testing and encouragement 297 | 298 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002-2006 Marcus Geelnard 2 | 3 | Copyright (c) 2006-2019 Camilla Löwy 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would 16 | be appreciated but is not required. 17 | 18 | 2. Altered source versions must be plainly marked as such, and must not 19 | be misrepresented as being the original software. 20 | 21 | 3. This notice may not be removed or altered from any source 22 | distribution. 23 | 24 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/README.md: -------------------------------------------------------------------------------- 1 | # GLFW (modified for raylib) 2 | 3 | This directory contains a modification of GLFW, whose official website and 4 | upstream repository are https://glfw.org and https://github.com/glfw/glfw, 5 | respectively. 6 | 7 | In this modification, some static functions sharing the same name in different 8 | platforms have been renamed so all of GLFW's source files can be combined into 9 | one (as done by ``rglfw.c``). Also, the Null platform, which is not used by 10 | raylib, has been disabled. The renamed functions are: 11 | 12 | `` 13 | createKeyTables() 14 | translateKey() 15 | acquireMonitor() 16 | releaseMonitor() 17 | `` 18 | 19 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/deps/getopt.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012, Kim Gräsman 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * * Redistributions of source code must retain the above copyright notice, 7 | * this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above copyright notice, 9 | * this list of conditions and the following disclaimer in the documentation 10 | * and/or other materials provided with the distribution. 11 | * * Neither the name of Kim Gräsman nor the names of contributors may be used 12 | * to endorse or promote products derived from this software without specific 13 | * prior written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | * ARE DISCLAIMED. IN NO EVENT SHALL KIM GRÄSMAN BE LIABLE FOR ANY DIRECT, 19 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #ifndef INCLUDED_GETOPT_PORT_H 28 | #define INCLUDED_GETOPT_PORT_H 29 | 30 | #if defined(__cplusplus) 31 | extern "C" { 32 | #endif 33 | 34 | extern const int no_argument; 35 | extern const int required_argument; 36 | extern const int optional_argument; 37 | 38 | extern char* optarg; 39 | extern int optind, opterr, optopt; 40 | 41 | struct option { 42 | const char* name; 43 | int has_arg; 44 | int* flag; 45 | int val; 46 | }; 47 | 48 | int getopt(int argc, char* const argv[], const char* optstring); 49 | 50 | int getopt_long(int argc, char* const argv[], 51 | const char* optstring, const struct option* longopts, int* longindex); 52 | 53 | #if defined(__cplusplus) 54 | } 55 | #endif 56 | 57 | #endif // INCLUDED_GETOPT_PORT_H 58 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/deps/mingw/_mingw_dxhelper.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This file has no copyright assigned and is placed in the Public Domain. 3 | * This file is part of the mingw-w64 runtime package. 4 | * No warranty is given; refer to the file DISCLAIMER within this package. 5 | */ 6 | 7 | #if defined(_MSC_VER) && !defined(_MSC_EXTENSIONS) 8 | #define NONAMELESSUNION 1 9 | #endif 10 | #if defined(NONAMELESSSTRUCT) && \ 11 | !defined(NONAMELESSUNION) 12 | #define NONAMELESSUNION 1 13 | #endif 14 | #if defined(NONAMELESSUNION) && \ 15 | !defined(NONAMELESSSTRUCT) 16 | #define NONAMELESSSTRUCT 1 17 | #endif 18 | #if !defined(__GNU_EXTENSION) 19 | #if defined(__GNUC__) || defined(__GNUG__) 20 | #define __GNU_EXTENSION __extension__ 21 | #else 22 | #define __GNU_EXTENSION 23 | #endif 24 | #endif /* __extension__ */ 25 | 26 | #ifndef __ANONYMOUS_DEFINED 27 | #define __ANONYMOUS_DEFINED 28 | #if defined(__GNUC__) || defined(__GNUG__) 29 | #define _ANONYMOUS_UNION __extension__ 30 | #define _ANONYMOUS_STRUCT __extension__ 31 | #else 32 | #define _ANONYMOUS_UNION 33 | #define _ANONYMOUS_STRUCT 34 | #endif 35 | #ifndef NONAMELESSUNION 36 | #define _UNION_NAME(x) 37 | #define _STRUCT_NAME(x) 38 | #else /* NONAMELESSUNION */ 39 | #define _UNION_NAME(x) x 40 | #define _STRUCT_NAME(x) x 41 | #endif 42 | #endif /* __ANONYMOUS_DEFINED */ 43 | 44 | #ifndef DUMMYUNIONNAME 45 | # ifdef NONAMELESSUNION 46 | # define DUMMYUNIONNAME u 47 | # define DUMMYUNIONNAME1 u1 /* Wine uses this variant */ 48 | # define DUMMYUNIONNAME2 u2 49 | # define DUMMYUNIONNAME3 u3 50 | # define DUMMYUNIONNAME4 u4 51 | # define DUMMYUNIONNAME5 u5 52 | # define DUMMYUNIONNAME6 u6 53 | # define DUMMYUNIONNAME7 u7 54 | # define DUMMYUNIONNAME8 u8 55 | # define DUMMYUNIONNAME9 u9 56 | # else /* NONAMELESSUNION */ 57 | # define DUMMYUNIONNAME 58 | # define DUMMYUNIONNAME1 /* Wine uses this variant */ 59 | # define DUMMYUNIONNAME2 60 | # define DUMMYUNIONNAME3 61 | # define DUMMYUNIONNAME4 62 | # define DUMMYUNIONNAME5 63 | # define DUMMYUNIONNAME6 64 | # define DUMMYUNIONNAME7 65 | # define DUMMYUNIONNAME8 66 | # define DUMMYUNIONNAME9 67 | # endif 68 | #endif /* DUMMYUNIONNAME */ 69 | 70 | #if !defined(DUMMYUNIONNAME1) /* MinGW does not define this one */ 71 | # ifdef NONAMELESSUNION 72 | # define DUMMYUNIONNAME1 u1 /* Wine uses this variant */ 73 | # else 74 | # define DUMMYUNIONNAME1 /* Wine uses this variant */ 75 | # endif 76 | #endif /* DUMMYUNIONNAME1 */ 77 | 78 | #ifndef DUMMYSTRUCTNAME 79 | # ifdef NONAMELESSUNION 80 | # define DUMMYSTRUCTNAME s 81 | # define DUMMYSTRUCTNAME1 s1 /* Wine uses this variant */ 82 | # define DUMMYSTRUCTNAME2 s2 83 | # define DUMMYSTRUCTNAME3 s3 84 | # define DUMMYSTRUCTNAME4 s4 85 | # define DUMMYSTRUCTNAME5 s5 86 | # else 87 | # define DUMMYSTRUCTNAME 88 | # define DUMMYSTRUCTNAME1 /* Wine uses this variant */ 89 | # define DUMMYSTRUCTNAME2 90 | # define DUMMYSTRUCTNAME3 91 | # define DUMMYSTRUCTNAME4 92 | # define DUMMYSTRUCTNAME5 93 | # endif 94 | #endif /* DUMMYSTRUCTNAME */ 95 | 96 | /* These are for compatibility with the Wine source tree */ 97 | 98 | #ifndef WINELIB_NAME_AW 99 | # ifdef __MINGW_NAME_AW 100 | # define WINELIB_NAME_AW __MINGW_NAME_AW 101 | # else 102 | # ifdef UNICODE 103 | # define WINELIB_NAME_AW(func) func##W 104 | # else 105 | # define WINELIB_NAME_AW(func) func##A 106 | # endif 107 | # endif 108 | #endif /* WINELIB_NAME_AW */ 109 | 110 | #ifndef DECL_WINELIB_TYPE_AW 111 | # ifdef __MINGW_TYPEDEF_AW 112 | # define DECL_WINELIB_TYPE_AW __MINGW_TYPEDEF_AW 113 | # else 114 | # define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type; 115 | # endif 116 | #endif /* DECL_WINELIB_TYPE_AW */ 117 | 118 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/deps/wayland/fractional-scale-v1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Copyright © 2022 Kenny Levinsen 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a 7 | copy of this software and associated documentation files (the "Software"), 8 | to deal in the Software without restriction, including without limitation 9 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 10 | and/or sell copies of the Software, and to permit persons to whom the 11 | Software is furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice (including the next 14 | paragraph) shall be included in all copies or substantial portions of the 15 | Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 20 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | 25 | 26 | 27 | This protocol allows a compositor to suggest for surfaces to render at 28 | fractional scales. 29 | 30 | A client can submit scaled content by utilizing wp_viewport. This is done by 31 | creating a wp_viewport object for the surface and setting the destination 32 | rectangle to the surface size before the scale factor is applied. 33 | 34 | The buffer size is calculated by multiplying the surface size by the 35 | intended scale. 36 | 37 | The wl_surface buffer scale should remain set to 1. 38 | 39 | If a surface has a surface-local size of 100 px by 50 px and wishes to 40 | submit buffers with a scale of 1.5, then a buffer of 150px by 75 px should 41 | be used and the wp_viewport destination rectangle should be 100 px by 50 px. 42 | 43 | For toplevel surfaces, the size is rounded halfway away from zero. The 44 | rounding algorithm for subsurface position and size is not defined. 45 | 46 | 47 | 48 | 49 | A global interface for requesting surfaces to use fractional scales. 50 | 51 | 52 | 53 | 54 | Informs the server that the client will not be using this protocol 55 | object anymore. This does not affect any other objects, 56 | wp_fractional_scale_v1 objects included. 57 | 58 | 59 | 60 | 61 | 63 | 64 | 65 | 66 | 67 | Create an add-on object for the the wl_surface to let the compositor 68 | request fractional scales. If the given wl_surface already has a 69 | wp_fractional_scale_v1 object associated, the fractional_scale_exists 70 | protocol error is raised. 71 | 72 | 74 | 76 | 77 | 78 | 79 | 80 | 81 | An additional interface to a wl_surface object which allows the compositor 82 | to inform the client of the preferred scale. 83 | 84 | 85 | 86 | 87 | Destroy the fractional scale object. When this object is destroyed, 88 | preferred_scale events will no longer be sent. 89 | 90 | 91 | 92 | 93 | 94 | Notification of a new preferred scale for this surface that the 95 | compositor suggests that the client should use. 96 | 97 | The sent scale is the numerator of a fraction with a denominator of 120. 98 | 99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/deps/wayland/idle-inhibit-unstable-v1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Copyright © 2015 Samsung Electronics Co., Ltd 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a 8 | copy of this software and associated documentation files (the "Software"), 9 | to deal in the Software without restriction, including without limitation 10 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 11 | and/or sell copies of the Software, and to permit persons to whom the 12 | Software is furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice (including the next 15 | paragraph) shall be included in all copies or substantial portions of the 16 | Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 21 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | DEALINGS IN THE SOFTWARE. 25 | 26 | 27 | 28 | 29 | This interface permits inhibiting the idle behavior such as screen 30 | blanking, locking, and screensaving. The client binds the idle manager 31 | globally, then creates idle-inhibitor objects for each surface. 32 | 33 | Warning! The protocol described in this file is experimental and 34 | backward incompatible changes may be made. Backward compatible changes 35 | may be added together with the corresponding interface version bump. 36 | Backward incompatible changes are done by bumping the version number in 37 | the protocol and interface names and resetting the interface version. 38 | Once the protocol is to be declared stable, the 'z' prefix and the 39 | version number in the protocol and interface names are removed and the 40 | interface version number is reset. 41 | 42 | 43 | 44 | 45 | Destroy the inhibit manager. 46 | 47 | 48 | 49 | 50 | 51 | Create a new inhibitor object associated with the given surface. 52 | 53 | 54 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | An idle inhibitor prevents the output that the associated surface is 63 | visible on from being set to a state where it is not visually usable due 64 | to lack of user interaction (e.g. blanked, dimmed, locked, set to power 65 | save, etc.) Any screensaver processes are also blocked from displaying. 66 | 67 | If the surface is destroyed, unmapped, becomes occluded, loses 68 | visibility, or otherwise becomes not visually relevant for the user, the 69 | idle inhibitor will not be honored by the compositor; if the surface 70 | subsequently regains visibility the inhibitor takes effect once again. 71 | Likewise, the inhibitor isn't honored if the system was already idled at 72 | the time the inhibitor was established, although if the system later 73 | de-idles and re-idles the inhibitor will take effect. 74 | 75 | 76 | 77 | 78 | Remove the inhibitor effect from the associated wl_surface. 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/deps/wayland/relative-pointer-unstable-v1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Copyright © 2014 Jonas Ådahl 6 | Copyright © 2015 Red Hat Inc. 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a 9 | copy of this software and associated documentation files (the "Software"), 10 | to deal in the Software without restriction, including without limitation 11 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 | and/or sell copies of the Software, and to permit persons to whom the 13 | Software is furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice (including the next 16 | paragraph) shall be included in all copies or substantial portions of the 17 | Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 22 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 24 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | 28 | 29 | This protocol specifies a set of interfaces used for making clients able to 30 | receive relative pointer events not obstructed by barriers (such as the 31 | monitor edge or other pointer barriers). 32 | 33 | To start receiving relative pointer events, a client must first bind the 34 | global interface "wp_relative_pointer_manager" which, if a compositor 35 | supports relative pointer motion events, is exposed by the registry. After 36 | having created the relative pointer manager proxy object, the client uses 37 | it to create the actual relative pointer object using the 38 | "get_relative_pointer" request given a wl_pointer. The relative pointer 39 | motion events will then, when applicable, be transmitted via the proxy of 40 | the newly created relative pointer object. See the documentation of the 41 | relative pointer interface for more details. 42 | 43 | Warning! The protocol described in this file is experimental and backward 44 | incompatible changes may be made. Backward compatible changes may be added 45 | together with the corresponding interface version bump. Backward 46 | incompatible changes are done by bumping the version number in the protocol 47 | and interface names and resetting the interface version. Once the protocol 48 | is to be declared stable, the 'z' prefix and the version number in the 49 | protocol and interface names are removed and the interface version number is 50 | reset. 51 | 52 | 53 | 54 | 55 | A global interface used for getting the relative pointer object for a 56 | given pointer. 57 | 58 | 59 | 60 | 61 | Used by the client to notify the server that it will no longer use this 62 | relative pointer manager object. 63 | 64 | 65 | 66 | 67 | 68 | Create a relative pointer interface given a wl_pointer object. See the 69 | wp_relative_pointer interface for more details. 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | A wp_relative_pointer object is an extension to the wl_pointer interface 79 | used for emitting relative pointer events. It shares the same focus as 80 | wl_pointer objects of the same seat and will only emit events when it has 81 | focus. 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | Relative x/y pointer motion from the pointer of the seat associated with 91 | this object. 92 | 93 | A relative motion is in the same dimension as regular wl_pointer motion 94 | events, except they do not represent an absolute position. For example, 95 | moving a pointer from (x, y) to (x', y') would have the equivalent 96 | relative motion (x' - x, y' - y). If a pointer motion caused the 97 | absolute pointer position to be clipped by for example the edge of the 98 | monitor, the relative motion is unaffected by the clipping and will 99 | represent the unclipped motion. 100 | 101 | This event also contains non-accelerated motion deltas. The 102 | non-accelerated delta is, when applicable, the regular pointer motion 103 | delta as it was before having applied motion acceleration and other 104 | transformations such as normalization. 105 | 106 | Note that the non-accelerated delta does not represent 'raw' events as 107 | they were read from some device. Pointer motion acceleration is device- 108 | and configuration-specific and non-accelerated deltas and accelerated 109 | deltas may have the same value on some devices. 110 | 111 | Relative motions are not coupled to wl_pointer.motion events, and can be 112 | sent in combination with such events, but also independently. There may 113 | also be scenarios where wl_pointer.motion is sent, but there is no 114 | relative motion. The order of an absolute and relative motion event 115 | originating from the same physical motion is not guaranteed. 116 | 117 | If the client needs button events or focus state, it can receive them 118 | from a wl_pointer object of the same seat that the wp_relative_pointer 119 | object is associated with. 120 | 121 | 123 | 125 | 127 | 129 | 131 | 133 | 134 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/cocoa_joystick.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 Cocoa - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2006-2017 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | #define GLFW_COCOA_JOYSTICK_STATE _GLFWjoystickNS ns; 32 | #define GLFW_COCOA_LIBRARY_JOYSTICK_STATE 33 | 34 | // Cocoa-specific per-joystick data 35 | // 36 | typedef struct _GLFWjoystickNS 37 | { 38 | IOHIDDeviceRef device; 39 | CFMutableArrayRef axes; 40 | CFMutableArrayRef buttons; 41 | CFMutableArrayRef hats; 42 | } _GLFWjoystickNS; 43 | 44 | GLFWbool _glfwInitJoysticksCocoa(void); 45 | void _glfwTerminateJoysticksCocoa(void); 46 | GLFWbool _glfwPollJoystickCocoa(_GLFWjoystick* js, int mode); 47 | const char* _glfwGetMappingNameCocoa(void); 48 | void _glfwUpdateGamepadGUIDCocoa(char* guid); 49 | 50 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/cocoa_time.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 macOS - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2009-2016 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #include "internal.h" 28 | 29 | #if defined(GLFW_BUILD_COCOA_TIMER) 30 | 31 | #include 32 | 33 | 34 | ////////////////////////////////////////////////////////////////////////// 35 | ////// GLFW platform API ////// 36 | ////////////////////////////////////////////////////////////////////////// 37 | 38 | void _glfwPlatformInitTimer(void) 39 | { 40 | mach_timebase_info_data_t info; 41 | mach_timebase_info(&info); 42 | 43 | _glfw.timer.ns.frequency = (info.denom * 1e9) / info.numer; 44 | } 45 | 46 | uint64_t _glfwPlatformGetTimerValue(void) 47 | { 48 | return mach_absolute_time(); 49 | } 50 | 51 | uint64_t _glfwPlatformGetTimerFrequency(void) 52 | { 53 | return _glfw.timer.ns.frequency; 54 | } 55 | 56 | #endif // GLFW_BUILD_COCOA_TIMER 57 | 58 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/cocoa_time.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 macOS - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2009-2021 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #define GLFW_COCOA_LIBRARY_TIMER_STATE _GLFWtimerNS ns; 28 | 29 | // Cocoa-specific global timer data 30 | // 31 | typedef struct _GLFWtimerNS 32 | { 33 | uint64_t frequency; 34 | } _GLFWtimerNS; 35 | 36 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/glfw.rc.in: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | VS_VERSION_INFO VERSIONINFO 5 | FILEVERSION @GLFW_VERSION_MAJOR@,@GLFW_VERSION_MINOR@,@GLFW_VERSION_PATCH@,0 6 | PRODUCTVERSION @GLFW_VERSION_MAJOR@,@GLFW_VERSION_MINOR@,@GLFW_VERSION_PATCH@,0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_NT_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 12 | { 13 | BLOCK "StringFileInfo" 14 | { 15 | BLOCK "040904B0" 16 | { 17 | VALUE "CompanyName", "GLFW" 18 | VALUE "FileDescription", "GLFW @GLFW_VERSION@ DLL" 19 | VALUE "FileVersion", "@GLFW_VERSION@" 20 | VALUE "OriginalFilename", "glfw3.dll" 21 | VALUE "ProductName", "GLFW" 22 | VALUE "ProductVersion", "@GLFW_VERSION@" 23 | } 24 | } 25 | BLOCK "VarFileInfo" 26 | { 27 | VALUE "Translation", 0x409, 1200 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/linux_joystick.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 Linux - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2014 Jonas Ådahl 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | #define GLFW_LINUX_JOYSTICK_STATE _GLFWjoystickLinux linjs; 32 | #define GLFW_LINUX_LIBRARY_JOYSTICK_STATE _GLFWlibraryLinux linjs; 33 | 34 | // Linux-specific joystick data 35 | // 36 | typedef struct _GLFWjoystickLinux 37 | { 38 | int fd; 39 | char path[PATH_MAX]; 40 | int keyMap[KEY_CNT - BTN_MISC]; 41 | int absMap[ABS_CNT]; 42 | struct input_absinfo absInfo[ABS_CNT]; 43 | int hats[4][2]; 44 | } _GLFWjoystickLinux; 45 | 46 | // Linux-specific joystick API data 47 | // 48 | typedef struct _GLFWlibraryLinux 49 | { 50 | int inotify; 51 | int watch; 52 | regex_t regex; 53 | GLFWbool regexCompiled; 54 | GLFWbool dropped; 55 | } _GLFWlibraryLinux; 56 | 57 | void _glfwDetectJoystickConnectionLinux(void); 58 | 59 | GLFWbool _glfwInitJoysticksLinux(void); 60 | void _glfwTerminateJoysticksLinux(void); 61 | GLFWbool _glfwPollJoystickLinux(_GLFWjoystick* js, int mode); 62 | const char* _glfwGetMappingNameLinux(void); 63 | void _glfwUpdateGamepadGUIDLinux(char* guid); 64 | 65 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/mappings.h.in: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2006-2018 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | // As mappings.h.in, this file is used by CMake to produce the mappings.h 27 | // header file. If you are adding a GLFW specific gamepad mapping, this is 28 | // where to put it. 29 | //======================================================================== 30 | // As mappings.h, this provides all pre-defined gamepad mappings, including 31 | // all available in SDL_GameControllerDB. Do not edit this file. Any gamepad 32 | // mappings not specific to GLFW should be submitted to SDL_GameControllerDB. 33 | // This file can be re-generated from mappings.h.in and the upstream 34 | // gamecontrollerdb.txt with the 'update_mappings' CMake target. 35 | //======================================================================== 36 | 37 | // All gamepad mappings not labeled GLFW are copied from the 38 | // SDL_GameControllerDB project under the following license: 39 | // 40 | // Simple DirectMedia Layer 41 | // Copyright (C) 1997-2013 Sam Lantinga 42 | // 43 | // This software is provided 'as-is', without any express or implied warranty. 44 | // In no event will the authors be held liable for any damages arising from the 45 | // use of this software. 46 | // 47 | // Permission is granted to anyone to use this software for any purpose, 48 | // including commercial applications, and to alter it and redistribute it 49 | // freely, subject to the following restrictions: 50 | // 51 | // 1. The origin of this software must not be misrepresented; you must not 52 | // claim that you wrote the original software. If you use this software 53 | // in a product, an acknowledgment in the product documentation would 54 | // be appreciated but is not required. 55 | // 56 | // 2. Altered source versions must be plainly marked as such, and must not be 57 | // misrepresented as being the original software. 58 | // 59 | // 3. This notice may not be removed or altered from any source distribution. 60 | 61 | const char* _glfwDefaultMappings[] = 62 | { 63 | #if defined(_GLFW_WIN32) 64 | @GLFW_WIN32_MAPPINGS@ 65 | "78696e70757401000000000000000000,XInput Gamepad (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,", 66 | "78696e70757402000000000000000000,XInput Wheel (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,", 67 | "78696e70757403000000000000000000,XInput Arcade Stick (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,", 68 | "78696e70757404000000000000000000,XInput Flight Stick (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,", 69 | "78696e70757405000000000000000000,XInput Dance Pad (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,", 70 | "78696e70757406000000000000000000,XInput Guitar (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,", 71 | "78696e70757408000000000000000000,XInput Drum Kit (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,", 72 | #endif // _GLFW_WIN32 73 | 74 | #if defined(_GLFW_COCOA) 75 | @GLFW_COCOA_MAPPINGS@ 76 | #endif // _GLFW_COCOA 77 | 78 | #if defined(GLFW_BUILD_LINUX_JOYSTICK) 79 | @GLFW_LINUX_MAPPINGS@ 80 | #endif // GLFW_BUILD_LINUX_JOYSTICK 81 | }; 82 | 83 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/null_joystick.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2016-2017 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #include "internal.h" 28 | 29 | 30 | ////////////////////////////////////////////////////////////////////////// 31 | ////// GLFW platform API ////// 32 | ////////////////////////////////////////////////////////////////////////// 33 | 34 | GLFWbool _glfwInitJoysticksNull(void) 35 | { 36 | return GLFW_TRUE; 37 | } 38 | 39 | void _glfwTerminateJoysticksNull(void) 40 | { 41 | } 42 | 43 | GLFWbool _glfwPollJoystickNull(_GLFWjoystick* js, int mode) 44 | { 45 | return GLFW_FALSE; 46 | } 47 | 48 | const char* _glfwGetMappingNameNull(void) 49 | { 50 | return ""; 51 | } 52 | 53 | void _glfwUpdateGamepadGUIDNull(char* guid) 54 | { 55 | } 56 | 57 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/null_joystick.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2006-2017 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | GLFWbool _glfwInitJoysticksNull(void); 28 | void _glfwTerminateJoysticksNull(void); 29 | GLFWbool _glfwPollJoystickNull(_GLFWjoystick* js, int mode); 30 | const char* _glfwGetMappingNameNull(void); 31 | void _glfwUpdateGamepadGUIDNull(char* guid); 32 | 33 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/null_monitor.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2016 Google Inc. 5 | // Copyright (c) 2016-2019 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #include "internal.h" 29 | 30 | #include 31 | #include 32 | #include 33 | 34 | // The the sole (fake) video mode of our (sole) fake monitor 35 | // 36 | static GLFWvidmode getVideoMode(void) 37 | { 38 | GLFWvidmode mode; 39 | mode.width = 1920; 40 | mode.height = 1080; 41 | mode.redBits = 8; 42 | mode.greenBits = 8; 43 | mode.blueBits = 8; 44 | mode.refreshRate = 60; 45 | return mode; 46 | } 47 | 48 | ////////////////////////////////////////////////////////////////////////// 49 | ////// GLFW internal API ////// 50 | ////////////////////////////////////////////////////////////////////////// 51 | 52 | void _glfwPollMonitorsNull(void) 53 | { 54 | const float dpi = 141.f; 55 | const GLFWvidmode mode = getVideoMode(); 56 | _GLFWmonitor* monitor = _glfwAllocMonitor("Null SuperNoop 0", 57 | (int) (mode.width * 25.4f / dpi), 58 | (int) (mode.height * 25.4f / dpi)); 59 | _glfwInputMonitor(monitor, GLFW_CONNECTED, _GLFW_INSERT_FIRST); 60 | } 61 | 62 | ////////////////////////////////////////////////////////////////////////// 63 | ////// GLFW platform API ////// 64 | ////////////////////////////////////////////////////////////////////////// 65 | 66 | void _glfwFreeMonitorNull(_GLFWmonitor* monitor) 67 | { 68 | _glfwFreeGammaArrays(&monitor->null.ramp); 69 | } 70 | 71 | void _glfwGetMonitorPosNull(_GLFWmonitor* monitor, int* xpos, int* ypos) 72 | { 73 | if (xpos) 74 | *xpos = 0; 75 | if (ypos) 76 | *ypos = 0; 77 | } 78 | 79 | void _glfwGetMonitorContentScaleNull(_GLFWmonitor* monitor, 80 | float* xscale, float* yscale) 81 | { 82 | if (xscale) 83 | *xscale = 1.f; 84 | if (yscale) 85 | *yscale = 1.f; 86 | } 87 | 88 | void _glfwGetMonitorWorkareaNull(_GLFWmonitor* monitor, 89 | int* xpos, int* ypos, 90 | int* width, int* height) 91 | { 92 | const GLFWvidmode mode = getVideoMode(); 93 | 94 | if (xpos) 95 | *xpos = 0; 96 | if (ypos) 97 | *ypos = 10; 98 | if (width) 99 | *width = mode.width; 100 | if (height) 101 | *height = mode.height - 10; 102 | } 103 | 104 | GLFWvidmode* _glfwGetVideoModesNull(_GLFWmonitor* monitor, int* found) 105 | { 106 | GLFWvidmode* mode = _glfw_calloc(1, sizeof(GLFWvidmode)); 107 | *mode = getVideoMode(); 108 | *found = 1; 109 | return mode; 110 | } 111 | 112 | GLFWbool _glfwGetVideoModeNull(_GLFWmonitor* monitor, GLFWvidmode* mode) 113 | { 114 | *mode = getVideoMode(); 115 | return GLFW_TRUE; 116 | } 117 | 118 | GLFWbool _glfwGetGammaRampNull(_GLFWmonitor* monitor, GLFWgammaramp* ramp) 119 | { 120 | if (!monitor->null.ramp.size) 121 | { 122 | unsigned int i; 123 | 124 | _glfwAllocGammaArrays(&monitor->null.ramp, 256); 125 | 126 | for (i = 0; i < monitor->null.ramp.size; i++) 127 | { 128 | const float gamma = 2.2f; 129 | float value; 130 | value = i / (float) (monitor->null.ramp.size - 1); 131 | value = powf(value, 1.f / gamma) * 65535.f + 0.5f; 132 | value = fminf(value, 65535.f); 133 | 134 | monitor->null.ramp.red[i] = (unsigned short) value; 135 | monitor->null.ramp.green[i] = (unsigned short) value; 136 | monitor->null.ramp.blue[i] = (unsigned short) value; 137 | } 138 | } 139 | 140 | _glfwAllocGammaArrays(ramp, monitor->null.ramp.size); 141 | memcpy(ramp->red, monitor->null.ramp.red, sizeof(short) * ramp->size); 142 | memcpy(ramp->green, monitor->null.ramp.green, sizeof(short) * ramp->size); 143 | memcpy(ramp->blue, monitor->null.ramp.blue, sizeof(short) * ramp->size); 144 | return GLFW_TRUE; 145 | } 146 | 147 | void _glfwSetGammaRampNull(_GLFWmonitor* monitor, const GLFWgammaramp* ramp) 148 | { 149 | if (monitor->null.ramp.size != ramp->size) 150 | { 151 | _glfwInputError(GLFW_PLATFORM_ERROR, 152 | "Null: Gamma ramp size must match current ramp size"); 153 | return; 154 | } 155 | 156 | memcpy(monitor->null.ramp.red, ramp->red, sizeof(short) * ramp->size); 157 | memcpy(monitor->null.ramp.green, ramp->green, sizeof(short) * ramp->size); 158 | memcpy(monitor->null.ramp.blue, ramp->blue, sizeof(short) * ramp->size); 159 | } 160 | 161 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/platform.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 (modified for raylib) - www.glfw.org; www.raylib.com 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2018 Camilla Löwy 6 | // Copyright (c) 2024 M374LX 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 | #include "internal.h" 30 | 31 | #include 32 | #include 33 | 34 | // These construct a string literal from individual numeric constants 35 | #define _GLFW_CONCAT_VERSION(m, n, r) #m "." #n "." #r 36 | #define _GLFW_MAKE_VERSION(m, n, r) _GLFW_CONCAT_VERSION(m, n, r) 37 | 38 | ////////////////////////////////////////////////////////////////////////// 39 | ////// GLFW internal API ////// 40 | ////////////////////////////////////////////////////////////////////////// 41 | 42 | static const struct 43 | { 44 | int ID; 45 | GLFWbool (*connect)(int,_GLFWplatform*); 46 | } supportedPlatforms[] = 47 | { 48 | #if defined(_GLFW_WIN32) 49 | { GLFW_PLATFORM_WIN32, _glfwConnectWin32 }, 50 | #endif 51 | #if defined(_GLFW_COCOA) 52 | { GLFW_PLATFORM_COCOA, _glfwConnectCocoa }, 53 | #endif 54 | #if defined(_GLFW_WAYLAND) 55 | { GLFW_PLATFORM_WAYLAND, _glfwConnectWayland }, 56 | #endif 57 | #if defined(_GLFW_X11) 58 | { GLFW_PLATFORM_X11, _glfwConnectX11 }, 59 | #endif 60 | }; 61 | 62 | GLFWbool _glfwSelectPlatform(int desiredID, _GLFWplatform* platform) 63 | { 64 | const size_t count = sizeof(supportedPlatforms) / sizeof(supportedPlatforms[0]); 65 | size_t i; 66 | 67 | if (desiredID != GLFW_ANY_PLATFORM && 68 | desiredID != GLFW_PLATFORM_WIN32 && 69 | desiredID != GLFW_PLATFORM_COCOA && 70 | desiredID != GLFW_PLATFORM_WAYLAND && 71 | desiredID != GLFW_PLATFORM_X11 && 72 | desiredID != GLFW_PLATFORM_NULL) 73 | { 74 | _glfwInputError(GLFW_INVALID_ENUM, "Invalid platform ID 0x%08X", desiredID); 75 | return GLFW_FALSE; 76 | } 77 | 78 | #if defined(_GLFW_WAYLAND) && defined(_GLFW_X11) 79 | if (desiredID == GLFW_ANY_PLATFORM) 80 | { 81 | const char* const session = getenv("XDG_SESSION_TYPE"); 82 | if (session) 83 | { 84 | // Only follow XDG_SESSION_TYPE if it is set correctly and the 85 | // environment looks plausble; otherwise fall back to detection 86 | if (strcmp(session, "wayland") == 0 && getenv("WAYLAND_DISPLAY")) 87 | desiredID = GLFW_PLATFORM_WAYLAND; 88 | else if (strcmp(session, "x11") == 0 && getenv("DISPLAY")) 89 | desiredID = GLFW_PLATFORM_X11; 90 | } 91 | } 92 | #endif 93 | 94 | if (desiredID == GLFW_ANY_PLATFORM) 95 | { 96 | // If there is exactly one platform available for auto-selection, let it emit the 97 | // error on failure as the platform-specific error description may be more helpful 98 | if (count == 1) 99 | return supportedPlatforms[0].connect(supportedPlatforms[0].ID, platform); 100 | 101 | for (i = 0; i < count; i++) 102 | { 103 | if (supportedPlatforms[i].connect(desiredID, platform)) 104 | return GLFW_TRUE; 105 | } 106 | 107 | _glfwInputError(GLFW_PLATFORM_UNAVAILABLE, "Failed to detect any supported platform"); 108 | } 109 | else 110 | { 111 | for (i = 0; i < count; i++) 112 | { 113 | if (supportedPlatforms[i].ID == desiredID) 114 | return supportedPlatforms[i].connect(desiredID, platform); 115 | } 116 | 117 | _glfwInputError(GLFW_PLATFORM_UNAVAILABLE, "The requested platform is not supported"); 118 | } 119 | 120 | return GLFW_FALSE; 121 | } 122 | 123 | ////////////////////////////////////////////////////////////////////////// 124 | ////// GLFW public API ////// 125 | ////////////////////////////////////////////////////////////////////////// 126 | 127 | GLFWAPI int glfwGetPlatform(void) 128 | { 129 | _GLFW_REQUIRE_INIT_OR_RETURN(0); 130 | return _glfw.platform.platformID; 131 | } 132 | 133 | GLFWAPI int glfwPlatformSupported(int platformID) 134 | { 135 | const size_t count = sizeof(supportedPlatforms) / sizeof(supportedPlatforms[0]); 136 | size_t i; 137 | 138 | if (platformID != GLFW_PLATFORM_WIN32 && 139 | platformID != GLFW_PLATFORM_COCOA && 140 | platformID != GLFW_PLATFORM_WAYLAND && 141 | platformID != GLFW_PLATFORM_X11 && 142 | platformID != GLFW_PLATFORM_NULL) 143 | { 144 | _glfwInputError(GLFW_INVALID_ENUM, "Invalid platform ID 0x%08X", platformID); 145 | return GLFW_FALSE; 146 | } 147 | 148 | if (platformID == GLFW_PLATFORM_NULL) 149 | return GLFW_TRUE; 150 | 151 | for (i = 0; i < count; i++) 152 | { 153 | if (platformID == supportedPlatforms[i].ID) 154 | return GLFW_TRUE; 155 | } 156 | 157 | return GLFW_FALSE; 158 | } 159 | 160 | GLFWAPI const char* glfwGetVersionString(void) 161 | { 162 | return _GLFW_MAKE_VERSION(GLFW_VERSION_MAJOR, 163 | GLFW_VERSION_MINOR, 164 | GLFW_VERSION_REVISION) 165 | #if defined(_GLFW_WIN32) 166 | " Win32 WGL" 167 | #endif 168 | #if defined(_GLFW_COCOA) 169 | " Cocoa NSGL" 170 | #endif 171 | #if defined(_GLFW_WAYLAND) 172 | " Wayland" 173 | #endif 174 | #if defined(_GLFW_X11) 175 | " X11 GLX" 176 | #endif 177 | " Null" 178 | " EGL" 179 | " OSMesa" 180 | #if defined(__MINGW64_VERSION_MAJOR) 181 | " MinGW-w64" 182 | #elif defined(__MINGW32__) 183 | " MinGW" 184 | #elif defined(_MSC_VER) 185 | " VisualC" 186 | #endif 187 | #if defined(_GLFW_USE_HYBRID_HPG) || defined(_GLFW_USE_OPTIMUS_HPG) 188 | " hybrid-GPU" 189 | #endif 190 | #if defined(_POSIX_MONOTONIC_CLOCK) 191 | " monotonic" 192 | #endif 193 | #if defined(_GLFW_BUILD_DLL) 194 | #if defined(_WIN32) 195 | " DLL" 196 | #elif defined(__APPLE__) 197 | " dynamic" 198 | #else 199 | " shared" 200 | #endif 201 | #endif 202 | ; 203 | } 204 | 205 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/posix_module.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2021 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #include "internal.h" 28 | 29 | #if defined(GLFW_BUILD_POSIX_MODULE) 30 | 31 | #include 32 | 33 | ////////////////////////////////////////////////////////////////////////// 34 | ////// GLFW platform API ////// 35 | ////////////////////////////////////////////////////////////////////////// 36 | 37 | void* _glfwPlatformLoadModule(const char* path) 38 | { 39 | return dlopen(path, RTLD_LAZY | RTLD_LOCAL); 40 | } 41 | 42 | void _glfwPlatformFreeModule(void* module) 43 | { 44 | dlclose(module); 45 | } 46 | 47 | GLFWproc _glfwPlatformGetModuleSymbol(void* module, const char* name) 48 | { 49 | return dlsym(module, name); 50 | } 51 | 52 | #endif // GLFW_BUILD_POSIX_MODULE 53 | 54 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/posix_poll.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2022 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #define _GNU_SOURCE 28 | 29 | #include "internal.h" 30 | 31 | #if defined(GLFW_BUILD_POSIX_POLL) 32 | 33 | #include 34 | #include 35 | #include 36 | 37 | GLFWbool _glfwPollPOSIX(struct pollfd* fds, nfds_t count, double* timeout) 38 | { 39 | for (;;) 40 | { 41 | if (timeout) 42 | { 43 | const uint64_t base = _glfwPlatformGetTimerValue(); 44 | 45 | #if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__) 46 | const time_t seconds = (time_t) *timeout; 47 | const long nanoseconds = (long) ((*timeout - seconds) * 1e9); 48 | const struct timespec ts = { seconds, nanoseconds }; 49 | const int result = ppoll(fds, count, &ts, NULL); 50 | #elif defined(__NetBSD__) 51 | const time_t seconds = (time_t) *timeout; 52 | const long nanoseconds = (long) ((*timeout - seconds) * 1e9); 53 | const struct timespec ts = { seconds, nanoseconds }; 54 | const int result = pollts(fds, count, &ts, NULL); 55 | #else 56 | const int milliseconds = (int) (*timeout * 1e3); 57 | const int result = poll(fds, count, milliseconds); 58 | #endif 59 | const int error = errno; // clock_gettime may overwrite our error 60 | 61 | *timeout -= (_glfwPlatformGetTimerValue() - base) / 62 | (double) _glfwPlatformGetTimerFrequency(); 63 | 64 | if (result > 0) 65 | return GLFW_TRUE; 66 | else if (result == -1 && error != EINTR && error != EAGAIN) 67 | return GLFW_FALSE; 68 | else if (*timeout <= 0.0) 69 | return GLFW_FALSE; 70 | } 71 | else 72 | { 73 | const int result = poll(fds, count, -1); 74 | if (result > 0) 75 | return GLFW_TRUE; 76 | else if (result == -1 && errno != EINTR && errno != EAGAIN) 77 | return GLFW_FALSE; 78 | } 79 | } 80 | } 81 | 82 | #endif // GLFW_BUILD_POSIX_POLL 83 | 84 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/posix_poll.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2022 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #include 28 | 29 | GLFWbool _glfwPollPOSIX(struct pollfd* fds, nfds_t count, double* timeout); 30 | 31 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/posix_thread.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2017 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #include "internal.h" 29 | 30 | #if defined(GLFW_BUILD_POSIX_THREAD) 31 | 32 | #include 33 | #include 34 | 35 | 36 | ////////////////////////////////////////////////////////////////////////// 37 | ////// GLFW platform API ////// 38 | ////////////////////////////////////////////////////////////////////////// 39 | 40 | GLFWbool _glfwPlatformCreateTls(_GLFWtls* tls) 41 | { 42 | assert(tls->posix.allocated == GLFW_FALSE); 43 | 44 | if (pthread_key_create(&tls->posix.key, NULL) != 0) 45 | { 46 | _glfwInputError(GLFW_PLATFORM_ERROR, 47 | "POSIX: Failed to create context TLS"); 48 | return GLFW_FALSE; 49 | } 50 | 51 | tls->posix.allocated = GLFW_TRUE; 52 | return GLFW_TRUE; 53 | } 54 | 55 | void _glfwPlatformDestroyTls(_GLFWtls* tls) 56 | { 57 | if (tls->posix.allocated) 58 | pthread_key_delete(tls->posix.key); 59 | memset(tls, 0, sizeof(_GLFWtls)); 60 | } 61 | 62 | void* _glfwPlatformGetTls(_GLFWtls* tls) 63 | { 64 | assert(tls->posix.allocated == GLFW_TRUE); 65 | return pthread_getspecific(tls->posix.key); 66 | } 67 | 68 | void _glfwPlatformSetTls(_GLFWtls* tls, void* value) 69 | { 70 | assert(tls->posix.allocated == GLFW_TRUE); 71 | pthread_setspecific(tls->posix.key, value); 72 | } 73 | 74 | GLFWbool _glfwPlatformCreateMutex(_GLFWmutex* mutex) 75 | { 76 | assert(mutex->posix.allocated == GLFW_FALSE); 77 | 78 | if (pthread_mutex_init(&mutex->posix.handle, NULL) != 0) 79 | { 80 | _glfwInputError(GLFW_PLATFORM_ERROR, "POSIX: Failed to create mutex"); 81 | return GLFW_FALSE; 82 | } 83 | 84 | return mutex->posix.allocated = GLFW_TRUE; 85 | } 86 | 87 | void _glfwPlatformDestroyMutex(_GLFWmutex* mutex) 88 | { 89 | if (mutex->posix.allocated) 90 | pthread_mutex_destroy(&mutex->posix.handle); 91 | memset(mutex, 0, sizeof(_GLFWmutex)); 92 | } 93 | 94 | void _glfwPlatformLockMutex(_GLFWmutex* mutex) 95 | { 96 | assert(mutex->posix.allocated == GLFW_TRUE); 97 | pthread_mutex_lock(&mutex->posix.handle); 98 | } 99 | 100 | void _glfwPlatformUnlockMutex(_GLFWmutex* mutex) 101 | { 102 | assert(mutex->posix.allocated == GLFW_TRUE); 103 | pthread_mutex_unlock(&mutex->posix.handle); 104 | } 105 | 106 | #endif // GLFW_BUILD_POSIX_THREAD 107 | 108 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/posix_thread.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2017 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #include 29 | 30 | #define GLFW_POSIX_TLS_STATE _GLFWtlsPOSIX posix; 31 | #define GLFW_POSIX_MUTEX_STATE _GLFWmutexPOSIX posix; 32 | 33 | 34 | // POSIX-specific thread local storage data 35 | // 36 | typedef struct _GLFWtlsPOSIX 37 | { 38 | GLFWbool allocated; 39 | pthread_key_t key; 40 | } _GLFWtlsPOSIX; 41 | 42 | // POSIX-specific mutex data 43 | // 44 | typedef struct _GLFWmutexPOSIX 45 | { 46 | GLFWbool allocated; 47 | pthread_mutex_t handle; 48 | } _GLFWmutexPOSIX; 49 | 50 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/posix_time.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2017 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #include "internal.h" 29 | 30 | #if defined(GLFW_BUILD_POSIX_TIMER) 31 | 32 | #include 33 | #include 34 | 35 | 36 | ////////////////////////////////////////////////////////////////////////// 37 | ////// GLFW platform API ////// 38 | ////////////////////////////////////////////////////////////////////////// 39 | 40 | void _glfwPlatformInitTimer(void) 41 | { 42 | _glfw.timer.posix.clock = CLOCK_REALTIME; 43 | _glfw.timer.posix.frequency = 1000000000; 44 | 45 | #if defined(_POSIX_MONOTONIC_CLOCK) 46 | struct timespec ts; 47 | if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) 48 | _glfw.timer.posix.clock = CLOCK_MONOTONIC; 49 | #endif 50 | } 51 | 52 | uint64_t _glfwPlatformGetTimerValue(void) 53 | { 54 | struct timespec ts; 55 | clock_gettime(_glfw.timer.posix.clock, &ts); 56 | return (uint64_t) ts.tv_sec * _glfw.timer.posix.frequency + (uint64_t) ts.tv_nsec; 57 | } 58 | 59 | uint64_t _glfwPlatformGetTimerFrequency(void) 60 | { 61 | return _glfw.timer.posix.frequency; 62 | } 63 | 64 | #endif // GLFW_BUILD_POSIX_TIMER 65 | 66 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/posix_time.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2017 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #define GLFW_POSIX_LIBRARY_TIMER_STATE _GLFWtimerPOSIX posix; 29 | 30 | #include 31 | #include 32 | 33 | 34 | // POSIX-specific global timer data 35 | // 36 | typedef struct _GLFWtimerPOSIX 37 | { 38 | clockid_t clock; 39 | uint64_t frequency; 40 | } _GLFWtimerPOSIX; 41 | 42 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/win32_joystick.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 Win32 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2006-2017 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #define GLFW_WIN32_JOYSTICK_STATE _GLFWjoystickWin32 win32; 28 | #define GLFW_WIN32_LIBRARY_JOYSTICK_STATE 29 | 30 | // Joystick element (axis, button or slider) 31 | // 32 | typedef struct _GLFWjoyobjectWin32 33 | { 34 | int offset; 35 | int type; 36 | } _GLFWjoyobjectWin32; 37 | 38 | // Win32-specific per-joystick data 39 | // 40 | typedef struct _GLFWjoystickWin32 41 | { 42 | _GLFWjoyobjectWin32* objects; 43 | int objectCount; 44 | IDirectInputDevice8W* device; 45 | DWORD index; 46 | GUID guid; 47 | } _GLFWjoystickWin32; 48 | 49 | void _glfwDetectJoystickConnectionWin32(void); 50 | void _glfwDetectJoystickDisconnectionWin32(void); 51 | 52 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/win32_module.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 Win32 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2021 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #include "internal.h" 28 | 29 | #if defined(GLFW_BUILD_WIN32_MODULE) 30 | 31 | ////////////////////////////////////////////////////////////////////////// 32 | ////// GLFW platform API ////// 33 | ////////////////////////////////////////////////////////////////////////// 34 | 35 | void* _glfwPlatformLoadModule(const char* path) 36 | { 37 | return LoadLibraryA(path); 38 | } 39 | 40 | void _glfwPlatformFreeModule(void* module) 41 | { 42 | FreeLibrary((HMODULE) module); 43 | } 44 | 45 | GLFWproc _glfwPlatformGetModuleSymbol(void* module, const char* name) 46 | { 47 | return (GLFWproc) GetProcAddress((HMODULE) module, name); 48 | } 49 | 50 | #endif // GLFW_BUILD_WIN32_MODULE 51 | 52 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/win32_thread.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 Win32 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2017 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #include "internal.h" 29 | 30 | #if defined(GLFW_BUILD_WIN32_THREAD) 31 | 32 | #include 33 | 34 | 35 | ////////////////////////////////////////////////////////////////////////// 36 | ////// GLFW platform API ////// 37 | ////////////////////////////////////////////////////////////////////////// 38 | 39 | GLFWbool _glfwPlatformCreateTls(_GLFWtls* tls) 40 | { 41 | assert(tls->win32.allocated == GLFW_FALSE); 42 | 43 | tls->win32.index = TlsAlloc(); 44 | if (tls->win32.index == TLS_OUT_OF_INDEXES) 45 | { 46 | _glfwInputError(GLFW_PLATFORM_ERROR, "Win32: Failed to allocate TLS index"); 47 | return GLFW_FALSE; 48 | } 49 | 50 | tls->win32.allocated = GLFW_TRUE; 51 | return GLFW_TRUE; 52 | } 53 | 54 | void _glfwPlatformDestroyTls(_GLFWtls* tls) 55 | { 56 | if (tls->win32.allocated) 57 | TlsFree(tls->win32.index); 58 | memset(tls, 0, sizeof(_GLFWtls)); 59 | } 60 | 61 | void* _glfwPlatformGetTls(_GLFWtls* tls) 62 | { 63 | assert(tls->win32.allocated == GLFW_TRUE); 64 | return TlsGetValue(tls->win32.index); 65 | } 66 | 67 | void _glfwPlatformSetTls(_GLFWtls* tls, void* value) 68 | { 69 | assert(tls->win32.allocated == GLFW_TRUE); 70 | TlsSetValue(tls->win32.index, value); 71 | } 72 | 73 | GLFWbool _glfwPlatformCreateMutex(_GLFWmutex* mutex) 74 | { 75 | assert(mutex->win32.allocated == GLFW_FALSE); 76 | InitializeCriticalSection(&mutex->win32.section); 77 | return mutex->win32.allocated = GLFW_TRUE; 78 | } 79 | 80 | void _glfwPlatformDestroyMutex(_GLFWmutex* mutex) 81 | { 82 | if (mutex->win32.allocated) 83 | DeleteCriticalSection(&mutex->win32.section); 84 | memset(mutex, 0, sizeof(_GLFWmutex)); 85 | } 86 | 87 | void _glfwPlatformLockMutex(_GLFWmutex* mutex) 88 | { 89 | assert(mutex->win32.allocated == GLFW_TRUE); 90 | EnterCriticalSection(&mutex->win32.section); 91 | } 92 | 93 | void _glfwPlatformUnlockMutex(_GLFWmutex* mutex) 94 | { 95 | assert(mutex->win32.allocated == GLFW_TRUE); 96 | LeaveCriticalSection(&mutex->win32.section); 97 | } 98 | 99 | #endif // GLFW_BUILD_WIN32_THREAD 100 | 101 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/win32_thread.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 Win32 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2017 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | // This is a workaround for the fact that glfw3.h needs to export APIENTRY (for 29 | // example to allow applications to correctly declare a GL_KHR_debug callback) 30 | // but windows.h assumes no one will define APIENTRY before it does 31 | #undef APIENTRY 32 | 33 | #include 34 | 35 | #define GLFW_WIN32_TLS_STATE _GLFWtlsWin32 win32; 36 | #define GLFW_WIN32_MUTEX_STATE _GLFWmutexWin32 win32; 37 | 38 | // Win32-specific thread local storage data 39 | // 40 | typedef struct _GLFWtlsWin32 41 | { 42 | GLFWbool allocated; 43 | DWORD index; 44 | } _GLFWtlsWin32; 45 | 46 | // Win32-specific mutex data 47 | // 48 | typedef struct _GLFWmutexWin32 49 | { 50 | GLFWbool allocated; 51 | CRITICAL_SECTION section; 52 | } _GLFWmutexWin32; 53 | 54 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/win32_time.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 Win32 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2017 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #include "internal.h" 29 | 30 | #if defined(GLFW_BUILD_WIN32_TIMER) 31 | 32 | ////////////////////////////////////////////////////////////////////////// 33 | ////// GLFW platform API ////// 34 | ////////////////////////////////////////////////////////////////////////// 35 | 36 | void _glfwPlatformInitTimer(void) 37 | { 38 | QueryPerformanceFrequency((LARGE_INTEGER*) &_glfw.timer.win32.frequency); 39 | } 40 | 41 | uint64_t _glfwPlatformGetTimerValue(void) 42 | { 43 | uint64_t value; 44 | QueryPerformanceCounter((LARGE_INTEGER*) &value); 45 | return value; 46 | } 47 | 48 | uint64_t _glfwPlatformGetTimerFrequency(void) 49 | { 50 | return _glfw.timer.win32.frequency; 51 | } 52 | 53 | #endif // GLFW_BUILD_WIN32_TIMER 54 | 55 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/win32_time.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 Win32 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2017 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | // This is a workaround for the fact that glfw3.h needs to export APIENTRY (for 29 | // example to allow applications to correctly declare a GL_KHR_debug callback) 30 | // but windows.h assumes no one will define APIENTRY before it does 31 | #undef APIENTRY 32 | 33 | #include 34 | 35 | #define GLFW_WIN32_LIBRARY_TIMER_STATE _GLFWtimerWin32 win32; 36 | 37 | // Win32-specific global timer data 38 | // 39 | typedef struct _GLFWtimerWin32 40 | { 41 | uint64_t frequency; 42 | } _GLFWtimerWin32; 43 | 44 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/external/glfw/src/xkb_unicode.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 Linux - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2014 Jonas Ådahl 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #define GLFW_INVALID_CODEPOINT 0xffffffffu 28 | 29 | uint32_t _glfwKeySym2Unicode(unsigned int keysym); 30 | 31 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/minshell.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | raylib web game 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 44 | 45 | 63 | 64 | 65 | 66 |

67 | 87 | {{{ SCRIPT }}} 88 | 89 | 90 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/raylib.dll.rc: -------------------------------------------------------------------------------- 1 | GLFW_ICON ICON "raylib.ico" 2 | 3 | 1 VERSIONINFO 4 | FILEVERSION 5,5,0,0 5 | PRODUCTVERSION 5,5,0,0 6 | BEGIN 7 | BLOCK "StringFileInfo" 8 | BEGIN 9 | //BLOCK "080904E4" // English UK 10 | BLOCK "040904E4" // English US 11 | BEGIN 12 | VALUE "CompanyName", "raylib technologies" 13 | VALUE "FileDescription", "raylib dynamic library (www.raylib.com)" 14 | VALUE "FileVersion", "5.5.0" 15 | VALUE "InternalName", "raylib.dll" 16 | VALUE "LegalCopyright", "(c) 2024 Ramon Santamaria (@raysan5)" 17 | VALUE "OriginalFilename", "raylib.dll" 18 | VALUE "ProductName", "raylib" 19 | VALUE "ProductVersion", "5.5.0" 20 | END 21 | END 22 | BLOCK "VarFileInfo" 23 | BEGIN 24 | //VALUE "Translation", 0x809, 1252 // English UK 25 | VALUE "Translation", 0x409, 1252 // English US 26 | END 27 | END 28 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/raylib.dll.rc.data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsoding/musializer/332a173d3010c5e6bb0c883cd32bc0b6e5c3451f/thirdparty/raylib-5.5/src/raylib.dll.rc.data -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/raylib.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsoding/musializer/332a173d3010c5e6bb0c883cd32bc0b6e5c3451f/thirdparty/raylib-5.5/src/raylib.ico -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/raylib.rc: -------------------------------------------------------------------------------- 1 | GLFW_ICON ICON "raylib.ico" 2 | 3 | 1 VERSIONINFO 4 | FILEVERSION 5,5,0,0 5 | PRODUCTVERSION 5,5,0,0 6 | BEGIN 7 | BLOCK "StringFileInfo" 8 | BEGIN 9 | //BLOCK "080904E4" // English UK 10 | BLOCK "040904E4" // English US 11 | BEGIN 12 | VALUE "CompanyName", "raylib technologies" 13 | VALUE "FileDescription", "raylib application (www.raylib.com)" 14 | VALUE "FileVersion", "5.5.0" 15 | VALUE "InternalName", "raylib" 16 | VALUE "LegalCopyright", "(c) 2024 Ramon Santamaria (@raysan5)" 17 | VALUE "OriginalFilename", "raylib" 18 | VALUE "ProductName", "raylib app" 19 | VALUE "ProductVersion", "5.5.0" 20 | END 21 | END 22 | BLOCK "VarFileInfo" 23 | BEGIN 24 | //VALUE "Translation", 0x809, 1252 // English UK 25 | VALUE "Translation", 0x409, 1252 // English US 26 | END 27 | END 28 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/raylib.rc.data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsoding/musializer/332a173d3010c5e6bb0c883cd32bc0b6e5c3451f/thirdparty/raylib-5.5/src/raylib.rc.data -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/rglfw.c: -------------------------------------------------------------------------------- 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-2024 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 | // 38 | // On Linux, _GLFW_X11 and _GLFW_WAYLAND can be combined 39 | 40 | //---------------------------------------------------------------------------------- 41 | // Feature Test Macros required for this module 42 | //---------------------------------------------------------------------------------- 43 | #if (defined(__linux__) || defined(PLATFORM_WEB)) && (_POSIX_C_SOURCE < 199309L) 44 | #undef _POSIX_C_SOURCE 45 | #define _POSIX_C_SOURCE 199309L // Required for: CLOCK_MONOTONIC if compiled with c99 without gnu ext. 46 | #endif 47 | #if (defined(__linux__) || defined(PLATFORM_WEB)) && !defined(_GNU_SOURCE) 48 | #undef _GNU_SOURCE 49 | #define _GNU_SOURCE // Required for: ppoll if compiled with c99 without gnu ext. 50 | #endif 51 | 52 | #if defined(_WIN32) || defined(__CYGWIN__) 53 | #define _GLFW_WIN32 54 | #endif 55 | #if defined(__linux__) 56 | #if !defined(_GLFW_WAYLAND) && !defined(_GLFW_X11) 57 | #error "Cannot disable Wayland and X11 at the same time" 58 | #endif 59 | #endif 60 | #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) 61 | #define _GLFW_X11 62 | #endif 63 | #if defined(__APPLE__) 64 | #define _GLFW_COCOA 65 | #define _GLFW_USE_MENUBAR // To create and populate the menu bar when the first window is created 66 | #define _GLFW_USE_RETINA // To have windows use the full resolution of Retina displays 67 | #endif 68 | #if defined(__TINYC__) 69 | #define _WIN32_WINNT_WINXP 0x0501 70 | #endif 71 | 72 | // Common modules to all platforms 73 | #include "external/glfw/src/init.c" 74 | #include "external/glfw/src/platform.c" 75 | #include "external/glfw/src/context.c" 76 | #include "external/glfw/src/monitor.c" 77 | #include "external/glfw/src/window.c" 78 | #include "external/glfw/src/input.c" 79 | #include "external/glfw/src/vulkan.c" 80 | 81 | #if defined(_WIN32) || defined(__CYGWIN__) 82 | #include "external/glfw/src/win32_init.c" 83 | #include "external/glfw/src/win32_module.c" 84 | #include "external/glfw/src/win32_monitor.c" 85 | #include "external/glfw/src/win32_window.c" 86 | #include "external/glfw/src/win32_joystick.c" 87 | #include "external/glfw/src/win32_time.c" 88 | #include "external/glfw/src/win32_thread.c" 89 | #include "external/glfw/src/wgl_context.c" 90 | 91 | #include "external/glfw/src/egl_context.c" 92 | #include "external/glfw/src/osmesa_context.c" 93 | #endif 94 | 95 | #if defined(__linux__) 96 | #include "external/glfw/src/posix_module.c" 97 | #include "external/glfw/src/posix_thread.c" 98 | #include "external/glfw/src/posix_time.c" 99 | #include "external/glfw/src/posix_poll.c" 100 | #include "external/glfw/src/linux_joystick.c" 101 | #include "external/glfw/src/xkb_unicode.c" 102 | 103 | #include "external/glfw/src/egl_context.c" 104 | #include "external/glfw/src/osmesa_context.c" 105 | 106 | #if defined(_GLFW_WAYLAND) 107 | #include "external/glfw/src/wl_init.c" 108 | #include "external/glfw/src/wl_monitor.c" 109 | #include "external/glfw/src/wl_window.c" 110 | #endif 111 | #if defined(_GLFW_X11) 112 | #include "external/glfw/src/x11_init.c" 113 | #include "external/glfw/src/x11_monitor.c" 114 | #include "external/glfw/src/x11_window.c" 115 | #include "external/glfw/src/glx_context.c" 116 | #endif 117 | #endif 118 | 119 | #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__) || defined(__DragonFly__) 120 | #include "external/glfw/src/posix_module.c" 121 | #include "external/glfw/src/posix_thread.c" 122 | #include "external/glfw/src/posix_time.c" 123 | #include "external/glfw/src/posix_poll.c" 124 | #include "external/glfw/src/null_joystick.c" 125 | #include "external/glfw/src/xkb_unicode.c" 126 | 127 | #include "external/glfw/src/x11_init.c" 128 | #include "external/glfw/src/x11_monitor.c" 129 | #include "external/glfw/src/x11_window.c" 130 | #include "external/glfw/src/glx_context.c" 131 | 132 | #include "external/glfw/src/egl_context.c" 133 | #include "external/glfw/src/osmesa_context.c" 134 | #endif 135 | 136 | #if defined(__APPLE__) 137 | #include "external/glfw/src/posix_module.c" 138 | #include "external/glfw/src/posix_thread.c" 139 | #include "external/glfw/src/cocoa_init.m" 140 | #include "external/glfw/src/cocoa_joystick.m" 141 | #include "external/glfw/src/cocoa_monitor.m" 142 | #include "external/glfw/src/cocoa_window.m" 143 | #include "external/glfw/src/cocoa_time.c" 144 | #include "external/glfw/src/nsgl_context.m" 145 | 146 | #include "external/glfw/src/egl_context.c" 147 | #include "external/glfw/src/osmesa_context.c" 148 | #endif 149 | -------------------------------------------------------------------------------- /thirdparty/raylib-5.5/src/utils.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************************** 2 | * 3 | * raylib.utils - Some common utility functions 4 | * 5 | * 6 | * LICENSE: zlib/libpng 7 | * 8 | * Copyright (c) 2014-2024 Ramon Santamaria (@raysan5) 9 | * 10 | * This software is provided "as-is", without any express or implied warranty. In no event 11 | * will the authors be held liable for any damages arising from the use of this software. 12 | * 13 | * Permission is granted to anyone to use this software for any purpose, including commercial 14 | * applications, and to alter it and redistribute it freely, subject to the following restrictions: 15 | * 16 | * 1. The origin of this software must not be misrepresented; you must not claim that you 17 | * wrote the original software. If you use this software in a product, an acknowledgment 18 | * in the product documentation would be appreciated but is not required. 19 | * 20 | * 2. Altered source versions must be plainly marked as such, and must not be misrepresented 21 | * as being the original software. 22 | * 23 | * 3. This notice may not be removed or altered from any source distribution. 24 | * 25 | **********************************************************************************************/ 26 | 27 | #ifndef UTILS_H 28 | #define UTILS_H 29 | 30 | #if defined(PLATFORM_ANDROID) 31 | #include // Required for: FILE 32 | #include // Required for: AAssetManager 33 | #endif 34 | 35 | #if defined(SUPPORT_TRACELOG) 36 | #define TRACELOG(level, ...) TraceLog(level, __VA_ARGS__) 37 | 38 | #if defined(SUPPORT_TRACELOG_DEBUG) 39 | #define TRACELOGD(...) TraceLog(LOG_DEBUG, __VA_ARGS__) 40 | #else 41 | #define TRACELOGD(...) (void)0 42 | #endif 43 | #else 44 | #define TRACELOG(level, ...) (void)0 45 | #define TRACELOGD(...) (void)0 46 | #endif 47 | 48 | //---------------------------------------------------------------------------------- 49 | // Some basic Defines 50 | //---------------------------------------------------------------------------------- 51 | #if defined(PLATFORM_ANDROID) 52 | #define fopen(name, mode) android_fopen(name, mode) 53 | #endif 54 | 55 | //---------------------------------------------------------------------------------- 56 | // Types and Structures Definition 57 | //---------------------------------------------------------------------------------- 58 | //... 59 | 60 | //---------------------------------------------------------------------------------- 61 | // Global Variables Definition 62 | //---------------------------------------------------------------------------------- 63 | // Nop... 64 | 65 | //---------------------------------------------------------------------------------- 66 | // Module Functions Declaration 67 | //---------------------------------------------------------------------------------- 68 | #if defined(__cplusplus) 69 | extern "C" { // Prevents name mangling of functions 70 | #endif 71 | 72 | #if defined(PLATFORM_ANDROID) 73 | void InitAssetManager(AAssetManager *manager, const char *dataPath); // Initialize asset manager from android app 74 | FILE *android_fopen(const char *fileName, const char *mode); // Replacement for fopen() -> Read-only! 75 | #endif 76 | 77 | #if defined(__cplusplus) 78 | } 79 | #endif 80 | 81 | #endif // UTILS_H 82 | --------------------------------------------------------------------------------