glfw3.c 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/GLFW/CMakeLists.txt +368 -0
  2. package/GLFW/cocoa_init.m +694 -0
  3. package/GLFW/cocoa_joystick.h +49 -0
  4. package/GLFW/cocoa_joystick.m +485 -0
  5. package/GLFW/cocoa_monitor.m +643 -0
  6. package/GLFW/cocoa_platform.h +302 -0
  7. package/GLFW/cocoa_time.c +57 -0
  8. package/GLFW/cocoa_time.h +35 -0
  9. package/GLFW/cocoa_window.m +2072 -0
  10. package/GLFW/context.c +765 -0
  11. package/GLFW/egl_context.c +911 -0
  12. package/GLFW/glfw.rc.in +30 -0
  13. package/GLFW/glfw3.c +109 -0
  14. package/GLFW/glfw3.h +6564 -0
  15. package/GLFW/glfw3native.h +663 -0
  16. package/GLFW/glx_context.c +719 -0
  17. package/GLFW/init.c +528 -0
  18. package/GLFW/input.c +1505 -0
  19. package/GLFW/internal.h +1022 -0
  20. package/GLFW/linux_joystick.c +436 -0
  21. package/GLFW/linux_joystick.h +64 -0
  22. package/GLFW/mappings.h +1001 -0
  23. package/GLFW/mappings.h.in +82 -0
  24. package/GLFW/monitor.c +548 -0
  25. package/GLFW/nsgl_context.m +384 -0
  26. package/GLFW/null_init.c +264 -0
  27. package/GLFW/null_joystick.c +56 -0
  28. package/GLFW/null_joystick.h +32 -0
  29. package/GLFW/null_monitor.c +160 -0
  30. package/GLFW/null_platform.h +271 -0
  31. package/GLFW/null_window.c +719 -0
  32. package/GLFW/osmesa_context.c +383 -0
  33. package/GLFW/platform.c +214 -0
  34. package/GLFW/platform.h +212 -0
  35. package/GLFW/posix_module.c +53 -0
  36. package/GLFW/posix_poll.c +83 -0
  37. package/GLFW/posix_poll.h +30 -0
  38. package/GLFW/posix_thread.c +107 -0
  39. package/GLFW/posix_thread.h +49 -0
  40. package/GLFW/posix_time.c +65 -0
  41. package/GLFW/posix_time.h +41 -0
  42. package/GLFW/vulkan.c +328 -0
  43. package/GLFW/wgl_context.c +798 -0
  44. package/GLFW/win32_init.c +731 -0
  45. package/GLFW/win32_joystick.c +767 -0
  46. package/GLFW/win32_joystick.h +51 -0
  47. package/GLFW/win32_module.c +51 -0
  48. package/GLFW/win32_monitor.c +569 -0
  49. package/GLFW/win32_platform.h +631 -0
  50. package/GLFW/win32_thread.c +100 -0
  51. package/GLFW/win32_thread.h +53 -0
  52. package/GLFW/win32_time.c +54 -0
  53. package/GLFW/win32_time.h +43 -0
  54. package/GLFW/win32_window.c +2592 -0
  55. package/GLFW/window.c +1172 -0
  56. package/GLFW/wl_init.c +1003 -0
  57. package/GLFW/wl_monitor.c +274 -0
  58. package/GLFW/wl_platform.h +691 -0
  59. package/GLFW/wl_window.c +3308 -0
  60. package/GLFW/x11_init.c +1656 -0
  61. package/GLFW/x11_monitor.c +641 -0
  62. package/GLFW/x11_platform.h +1004 -0
  63. package/GLFW/x11_window.c +3357 -0
  64. package/GLFW/xkb_unicode.c +943 -0
  65. package/GLFW/xkb_unicode.h +30 -0
  66. package/LICENSE +22 -0
  67. package/README.md +236 -0
  68. package/package.json +32 -0
@@ -0,0 +1,30 @@
1
+ //========================================================================
2
+ // GLFW 3.4 Linux - www.glfw.org
3
+ //------------------------------------------------------------------------
4
+ // Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
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
+
package/LICENSE ADDED
@@ -0,0 +1,22 @@
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.
package/README.md ADDED
@@ -0,0 +1,236 @@
1
+ # GLFW
2
+
3
+ [![Build status](https://github.com/glfw/glfw/actions/workflows/build.yml/badge.svg)](https://github.com/glfw/glfw/actions)
4
+
5
+ <!-- [![Build status](https://ci.appveyor.com/api/projects/status/0kf0ct9831i5l6sp/branch/master?svg=true)](https://ci.appveyor.com/project/elmindreda/glfw) -->
6
+
7
+ ## Introduction
8
+
9
+ GLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan
10
+ application development. It provides a simple, platform-independent API for
11
+ creating windows, contexts and surfaces, reading input, handling events, etc.
12
+
13
+ GLFW is written primarily in C99, with parts of macOS support being written in
14
+ Objective-C.
15
+
16
+ GLFW supports Windows, macOS and Linux, and also works on many other Unix-like
17
+ systems. On Linux both Wayland and X11 are supported.
18
+
19
+ GLFW is licensed under the [zlib/libpng
20
+ license](https://www.glfw.org/license.html).
21
+
22
+ You can [download](https://www.glfw.org/download.html) the latest stable release
23
+ as source or Windows and macOS binaries. There are [release
24
+ tags](https://github.com/glfw/glfw/releases) with source and binary archives
25
+ attached for every version since 3.0.
26
+
27
+ The [documentation](https://www.glfw.org/docs/latest/) is available online and is
28
+ also included in source and binary archives, except those generated
29
+ automatically by Github. The documentation contains guides, a tutorial and the
30
+ API reference. The [release
31
+ notes](https://www.glfw.org/docs/latest/news.html) list the new features,
32
+ caveats and deprecations in the latest release. The [version
33
+ history](https://www.glfw.org/changelog.html) lists every user-visible change
34
+ for every release.
35
+
36
+ GLFW exists because of the contributions of [many people](CONTRIBUTORS.md)
37
+ around the world, whether by reporting bugs, providing community support, adding
38
+ features, reviewing or testing code, debugging, proofreading docs, suggesting
39
+ features or fixing bugs.
40
+
41
+ <br>
42
+
43
+ ## System requirements
44
+
45
+ GLFW supports Windows 7 and later and macOS 10.11 and later. On GNOME Wayland,
46
+ window decorations will be very basic unless the
47
+ [libdecor](https://gitlab.freedesktop.org/libdecor/libdecor) package is
48
+ installed. Linux and other Unix-like systems running X11 are supported even
49
+ without a desktop environment or modern extensions, although some features
50
+ require a clipboard manager or a modern window manager.
51
+
52
+ See the [compatibility guide](https://www.glfw.org/docs/latest/compat.html)
53
+ for more detailed information.
54
+
55
+ <br>
56
+
57
+ ## Installation
58
+
59
+ Run:
60
+
61
+ ```sh
62
+ $ npm i glfw.c
63
+ ```
64
+
65
+ And then include `glfw3.h` as follows:
66
+
67
+ ```c
68
+ // main.c
69
+ #define GLFW_IMPLEMENTATION
70
+ #include "node_modules/glfw.c/GLFW/glfw3.h"
71
+
72
+ int main() { /* ... */ }
73
+ ```
74
+
75
+ And then compile with `clang` or `gcc` as usual.
76
+
77
+ ```bash
78
+ $ clang main.c # or, use gcc
79
+ $ gcc main.c
80
+ ```
81
+
82
+ You may also use a simpler approach:
83
+
84
+ ```c
85
+ // main.c
86
+ #define GLFW_IMPLEMENTATION
87
+ #include <GLFW/glfw3.h>
88
+
89
+ int main() { /* ... */ }
90
+ ```
91
+
92
+ If you add the path `node_modules/glfw.c` to your compiler's include paths.
93
+
94
+ ```bash
95
+ $ clang -I./node_modules/glfw.c main.c # or, use gcc
96
+ $ gcc -I./node_modules/glfw.c main.c
97
+ ```
98
+
99
+ <br>
100
+
101
+ ## Compiling GLFW
102
+
103
+ GLFW supports compilation with Visual C++ (2013 and later), GCC and Clang. Both
104
+ Clang-CL and MinGW-w64 are supported. Other C99 compilers will likely also
105
+ work, but this is not regularly tested.
106
+
107
+ There are [pre-compiled binaries](https://www.glfw.org/download.html)
108
+ available for Windows and macOS.
109
+
110
+ GLFW itself needs only CMake and the headers and libraries for your operating
111
+ system and window system. No other SDKs are required.
112
+
113
+ See the [compilation guide](https://www.glfw.org/docs/latest/compile.html) for
114
+ more information about compiling GLFW and the exact dependencies required for
115
+ each window system.
116
+
117
+ The examples and test programs depend on a number of tiny libraries. These are
118
+ bundled in the `deps/` directory. The repository has no submodules.
119
+
120
+ - [getopt\_port](https://github.com/kimgr/getopt_port/) for examples
121
+ with command-line options
122
+ - [TinyCThread](https://github.com/tinycthread/tinycthread) for threaded
123
+ examples
124
+ - [glad2](https://github.com/Dav1dde/glad) for loading OpenGL and Vulkan
125
+ functions
126
+ - [linmath.h](https://github.com/datenwolf/linmath.h) for linear algebra in
127
+ examples
128
+ - [Nuklear](https://github.com/Immediate-Mode-UI/Nuklear) for test and example UI
129
+ - [stb\_image\_write](https://github.com/nothings/stb) for writing images to disk
130
+
131
+ The documentation is generated with [Doxygen](https://doxygen.org/) when the
132
+ library is built, provided CMake could find a sufficiently new version of it
133
+ during configuration.
134
+
135
+ <br>
136
+
137
+ ## Using GLFW
138
+
139
+ See the [HTML documentation](https://www.glfw.org/docs/latest/) for a tutorial,
140
+ guides and the API reference.
141
+
142
+ <br>
143
+
144
+ ## Contributing to GLFW
145
+
146
+ See the [contribution
147
+ guide](https://github.com/glfw/glfw/blob/master/docs/CONTRIBUTING.md) for
148
+ more information.
149
+
150
+ The `master` branch is the stable integration branch and _should_ always compile
151
+ and run on all supported platforms. Details of a newly added feature,
152
+ including the public API, may change until it has been included in a release.
153
+
154
+ The `latest` branch is equivalent to the [highest numbered](https://semver.org/)
155
+ release, although it may not always point to the same commit as the tag for that
156
+ release.
157
+
158
+ The `ci` branch is used to trigger continuous integration jobs for code under
159
+ testing and should never be relied on for any purpose.
160
+
161
+ <br>
162
+
163
+ ## Reporting bugs
164
+
165
+ Bugs are reported to our [issue tracker](https://github.com/glfw/glfw/issues).
166
+ Please check the [contribution
167
+ guide](https://github.com/glfw/glfw/blob/master/docs/CONTRIBUTING.md) for
168
+ information on what to include when reporting a bug.
169
+
170
+ <br>
171
+
172
+ ## Changelog since 3.4
173
+
174
+ - Added `GLFW_UNLIMITED_MOUSE_BUTTONS` input mode that allows mouse buttons beyond
175
+ the limit of the mouse button tokens to be reported (#2423)
176
+ - Added `glfwGetEGLConfig` function to query the `EGLConfig` of a window (#2045)
177
+ - Added `glfwGetGLXFBConfig` function to query the `GLXFBConfig` of a window (#1925)
178
+ - Updated minimum CMake version to 3.16 (#2541)
179
+ - Removed support for building with original MinGW (#2540)
180
+ - [Win32] Removed support for Windows XP and Vista (#2505)
181
+ - [Cocoa] Added `QuartzCore` framework as link-time dependency
182
+ - [Cocoa] Removed support for OS X 10.10 Yosemite and earlier (#2506)
183
+ - [Wayland] Bugfix: The fractional scaling related objects were not destroyed
184
+ - [Wayland] Bugfix: `glfwInit` would segfault on compositor with no seat (#2517)
185
+ - [Wayland] Bugfix: A drag entering a non-GLFW surface could cause a segfault
186
+ - [Wayland] Bugfix: Ignore key repeat events when no window has keyboard focus (#2727)
187
+ - [Wayland] Bugfix: Reset key repeat timer when window destroyed (#2741,#2727)
188
+ - [Wayland] Bugfix: Memory would leak if reading a data offer failed midway
189
+ - [Wayland] Bugfix: Retrieved cursor position would be incorrect when hovering over
190
+ fallback decorations
191
+ - [Wayland] Bugfix: Fallback decorations would report scroll events
192
+ - [Wayland] Bugfix: Keyboard repeat events halted when any key is released (#2568)
193
+ - [Wayland] Bugfix: Fallback decorations would show menu at wrong position
194
+ - [Wayland] Bugfix: The cursor was not updated when clicking through from
195
+ a modal to a fallback decoration
196
+ - [Wayland] Bugfix: The cursor position was not updated when clicking through
197
+ from a modal to the content area
198
+ - [Wayland] Bugfix: free modules at end of terminate function to resolve
199
+ potential segmentation fault (#2744)
200
+ - [Wayland] Bugfix: Confining or disabling the cursor could segfault on
201
+ compositors without `pointer-constraints-unstable-v1`
202
+ - [X11] Bugfix: Running without a WM could trigger an assert (#2593,#2601,#2631)
203
+ - [X11] Bugfix: Occasional crash when an idle display awakes (#2766)
204
+ - [X11] Bugfix: Prevent BadWindow when creating small windows with a content scale
205
+ less than 1 (#2754)
206
+ - [X11] Bugfix: Clamp width and height to >= 1 to prevent BadValue error and app exit
207
+ - [Linux] Bugfix: The header for `ioctl` was only implicitly included (#2778)
208
+ - [Null] Added Vulkan 'window' surface creation via `VK_EXT_headless_surface`
209
+ - [Null] Added EGL context creation on Mesa via `EGL_MESA_platform_surfaceless`
210
+ - [EGL] Allowed native access on Wayland with `GLFW_CONTEXT_CREATION_API` set to
211
+ `GLFW_NATIVE_CONTEXT_API` (#2518)
212
+
213
+ <br>
214
+
215
+ ## Contact
216
+
217
+ On [glfw.org](https://www.glfw.org/) you can find the latest version of GLFW, as
218
+ well as news, documentation and other information about the project.
219
+
220
+ If you have questions related to the use of GLFW, we have a
221
+ [forum](https://discourse.glfw.org/).
222
+
223
+ If you have a bug to report, a patch to submit or a feature you'd like to
224
+ request, please file it in the
225
+ [issue tracker](https://github.com/glfw/glfw/issues) on GitHub.
226
+
227
+ Finally, if you're interested in helping out with the development of GLFW or
228
+ porting it to your favorite platform, join us on the forum or GitHub.
229
+
230
+ <br>
231
+ <br>
232
+
233
+
234
+ [![SRC](https://img.shields.io/badge/src-repo-green?logo=Org)](https://github.com/glfw/glfw)
235
+ [![ORG](https://img.shields.io/badge/org-nodef-green?logo=Org)](https://nodef.github.io)
236
+ ![](https://ga-beacon.deno.dev/G-RC63DPBH3P:SH3Eq-NoQ9mwgYeHWxu7cw/github.com/nodef/glfw.c)
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "glfw3.c",
3
+ "version": "3.4.0",
4
+ "description": "A multi-platform library for OpenGL, OpenGL ES and Vulkan development on the desktop; Marcus Geelnard (2002).",
5
+ "keywords": [
6
+ "c",
7
+ "windowing",
8
+ "library",
9
+ "opengl",
10
+ "graphics",
11
+ "window",
12
+ "vulkan",
13
+ "cross-platform"
14
+ ],
15
+ "homepage": "https://github.com/nodef/glfw3.c#readme",
16
+ "bugs": {
17
+ "url": "https://github.com/nodef/glfw3.c/issues"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/nodef/glfw3.c.git"
22
+ },
23
+ "license": "Zlib",
24
+ "author": "wolfram77@gmail.com",
25
+ "main": "GLFW/glfw3.h",
26
+ "scripts": {
27
+ "test": "bash build.sh test"
28
+ },
29
+ "dependencies": {
30
+ "glad.c": "^1.2025.11"
31
+ }
32
+ }