gosu 1.4.6 → 2.0.0.pre7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. checksums.yaml +4 -4
  2. data/COPYING +2 -1
  3. data/dependencies/SDL/include/SDL_assert.h +2 -0
  4. data/dependencies/SDL/include/SDL_atomic.h +2 -3
  5. data/dependencies/SDL/include/SDL_audio.h +7 -7
  6. data/dependencies/SDL/include/SDL_blendmode.h +1 -1
  7. data/dependencies/SDL/include/SDL_endian.h +3 -3
  8. data/dependencies/SDL/include/SDL_gamecontroller.h +4 -4
  9. data/dependencies/SDL/include/SDL_hints.h +83 -28
  10. data/dependencies/SDL/include/SDL_joystick.h +8 -5
  11. data/dependencies/SDL/include/SDL_keycode.h +1 -1
  12. data/dependencies/SDL/include/SDL_main.h +7 -0
  13. data/dependencies/SDL/include/SDL_mouse.h +6 -7
  14. data/dependencies/SDL/include/SDL_mutex.h +79 -5
  15. data/dependencies/SDL/include/SDL_opengl_glext.h +5 -1
  16. data/dependencies/SDL/include/SDL_power.h +7 -8
  17. data/dependencies/SDL/include/SDL_render.h +6 -1
  18. data/dependencies/SDL/include/SDL_revision.h +2 -2
  19. data/dependencies/SDL/include/SDL_sensor.h +1 -1
  20. data/dependencies/SDL/include/SDL_stdinc.h +19 -11
  21. data/dependencies/SDL/include/SDL_thread.h +2 -2
  22. data/dependencies/SDL/include/SDL_version.h +2 -2
  23. data/dependencies/SDL/include/SDL_video.h +30 -2
  24. data/dependencies/SDL/include/begin_code.h +7 -7
  25. data/dependencies/SDL/include/close_code.h +2 -2
  26. data/dependencies/SDL/lib/x64/libSDL2.dll.a +0 -0
  27. data/dependencies/SDL/lib/x86/libSDL2.dll.a +0 -0
  28. data/dependencies/SDL_sound/SDL_sound.h +1 -1
  29. data/dependencies/SDL_sound/dr_flac.h +48 -23
  30. data/dependencies/SDL_sound/dr_mp3.h +34 -14
  31. data/dependencies/SDL_sound/stb_vorbis.h +3 -2
  32. data/dependencies/mojoAL/mojoal.c +1 -1
  33. data/ext/{gosu → gosu-ffi}/extconf.rb +34 -33
  34. data/ext/gosu-ffi/gosu-ffi.def +465 -0
  35. data/ffi/Gosu.cpp +307 -0
  36. data/ffi/Gosu.h +84 -0
  37. data/ffi/Gosu_Channel.cpp +62 -0
  38. data/ffi/Gosu_Channel.h +17 -0
  39. data/ffi/Gosu_Color.cpp +132 -0
  40. data/ffi/Gosu_Color.h +31 -0
  41. data/ffi/Gosu_Constants.cpp +334 -0
  42. data/ffi/Gosu_FFI.h +34 -0
  43. data/ffi/Gosu_FFI_internal.h +161 -0
  44. data/ffi/Gosu_Font.cpp +92 -0
  45. data/ffi/Gosu_Font.h +32 -0
  46. data/ffi/Gosu_Image.cpp +218 -0
  47. data/ffi/Gosu_Image.h +66 -0
  48. data/ffi/Gosu_Sample.cpp +29 -0
  49. data/ffi/Gosu_Sample.h +14 -0
  50. data/ffi/Gosu_Song.cpp +69 -0
  51. data/ffi/Gosu_Song.h +18 -0
  52. data/ffi/Gosu_TextInput.cpp +94 -0
  53. data/ffi/Gosu_TextInput.h +25 -0
  54. data/ffi/Gosu_Window.cpp +314 -0
  55. data/ffi/Gosu_Window.h +78 -0
  56. data/include/Gosu/Audio.hpp +6 -11
  57. data/include/Gosu/Bitmap.hpp +38 -53
  58. data/include/Gosu/Buffer.hpp +54 -0
  59. data/include/Gosu/Color.hpp +27 -35
  60. data/include/Gosu/Directories.hpp +25 -28
  61. data/include/Gosu/Drawable.hpp +58 -0
  62. data/include/Gosu/Font.hpp +6 -5
  63. data/include/Gosu/Fwd.hpp +4 -6
  64. data/include/Gosu/Gosu.hpp +5 -5
  65. data/include/Gosu/Graphics.hpp +51 -61
  66. data/include/Gosu/GraphicsBase.hpp +1 -11
  67. data/include/Gosu/Image.hpp +12 -15
  68. data/include/Gosu/Math.hpp +50 -72
  69. data/include/Gosu/Transform.hpp +32 -0
  70. data/include/Gosu/Utility.hpp +51 -1
  71. data/include/Gosu/Version.hpp +3 -3
  72. data/include/Gosu/Window.hpp +15 -9
  73. data/lib/SDL2.dll +0 -0
  74. data/lib/gosu/channel.rb +49 -0
  75. data/lib/gosu/color.rb +150 -0
  76. data/lib/gosu/compat.rb +29 -8
  77. data/lib/gosu/constants.rb +386 -0
  78. data/lib/gosu/ffi.rb +259 -0
  79. data/lib/gosu/font.rb +56 -0
  80. data/lib/gosu/gl_tex_info.rb +33 -0
  81. data/lib/gosu/gosu.rb +210 -0
  82. data/lib/gosu/image.rb +153 -0
  83. data/lib/gosu/numeric.rb +17 -0
  84. data/lib/gosu/preview.rb +6 -6
  85. data/lib/gosu/sample.rb +24 -0
  86. data/lib/gosu/song.rb +56 -0
  87. data/lib/gosu/text_input.rb +69 -0
  88. data/lib/gosu/window.rb +228 -0
  89. data/lib/gosu.rb +29 -8
  90. data/lib64/SDL2.dll +0 -0
  91. data/rdoc/gosu.rb +0 -2
  92. data/src/Audio.cpp +12 -12
  93. data/src/AudioFile.hpp +5 -4
  94. data/src/AudioFileAudioToolbox.cpp +8 -8
  95. data/src/AudioFileSDLSound.cpp +7 -10
  96. data/src/BinPacker.cpp +187 -0
  97. data/src/BinPacker.hpp +55 -0
  98. data/src/Bitmap.cpp +166 -144
  99. data/src/BitmapIO.cpp +60 -86
  100. data/src/Buffer.cpp +159 -0
  101. data/src/ClipRectStack.cpp +38 -0
  102. data/src/ClipRectStack.hpp +17 -83
  103. data/src/Color.cpp +75 -80
  104. data/src/Directories.cpp +47 -0
  105. data/src/DirectoriesUIKit.cpp +50 -0
  106. data/src/DrawOp.hpp +9 -9
  107. data/src/DrawOpQueue.hpp +26 -32
  108. data/src/Drawable.cpp +95 -0
  109. data/src/EmptyDrawable.hpp +38 -0
  110. data/src/FPS.cpp +31 -0
  111. data/src/Font.cpp +104 -74
  112. data/src/GosuGLView.cpp +13 -11
  113. data/src/GosuViewController.cpp +2 -10
  114. data/src/Graphics.cpp +66 -129
  115. data/src/GraphicsImpl.hpp +14 -67
  116. data/src/Image.cpp +41 -35
  117. data/src/Input.cpp +7 -8
  118. data/src/Macro.cpp +6 -6
  119. data/src/Macro.hpp +4 -4
  120. data/src/MarkupParser.cpp +5 -5
  121. data/src/Math.cpp +35 -22
  122. data/src/OffScreenTarget.cpp +53 -49
  123. data/src/OffScreenTarget.hpp +13 -11
  124. data/src/OpenGLContext.cpp +117 -0
  125. data/src/OpenGLContext.hpp +41 -0
  126. data/src/RenderState.hpp +45 -56
  127. data/src/Resolution.cpp +23 -21
  128. data/src/TexChunk.cpp +35 -80
  129. data/src/TexChunk.hpp +44 -35
  130. data/src/Text.cpp +1 -1
  131. data/src/TextBuilder.cpp +35 -21
  132. data/src/TextBuilder.hpp +6 -9
  133. data/src/Texture.cpp +62 -80
  134. data/src/Texture.hpp +25 -23
  135. data/src/TiledDrawable.cpp +150 -0
  136. data/src/TiledDrawable.hpp +47 -0
  137. data/src/TimingApple.cpp +1 -1
  138. data/src/Transform.cpp +45 -50
  139. data/src/TransformStack.hpp +16 -16
  140. data/src/TrueTypeFont.cpp +59 -51
  141. data/src/TrueTypeFont.hpp +6 -7
  142. data/src/TrueTypeFontApple.cpp +28 -19
  143. data/src/TrueTypeFontUnix.cpp +27 -23
  144. data/src/TrueTypeFontWin.cpp +30 -30
  145. data/src/Utility.cpp +84 -21
  146. data/src/UtilityWin.cpp +45 -0
  147. data/src/Window.cpp +92 -142
  148. data/src/WindowUIKit.cpp +14 -14
  149. metadata +74 -32
  150. data/include/Gosu/IO.hpp +0 -254
  151. data/include/Gosu/ImageData.hpp +0 -53
  152. data/include/Gosu/Inspection.hpp +0 -7
  153. data/lib/gosu/patches.rb +0 -66
  154. data/lib/gosu/run.rb +0 -20
  155. data/lib/gosu/swig_patches.rb +0 -110
  156. data/src/BlockAllocator.cpp +0 -131
  157. data/src/BlockAllocator.hpp +0 -32
  158. data/src/DirectoriesApple.cpp +0 -69
  159. data/src/DirectoriesUnix.cpp +0 -46
  160. data/src/DirectoriesWin.cpp +0 -65
  161. data/src/EmptyImageData.hpp +0 -52
  162. data/src/FileUnix.cpp +0 -99
  163. data/src/FileWin.cpp +0 -88
  164. data/src/IO.cpp +0 -60
  165. data/src/Iconv.hpp +0 -51
  166. data/src/Inspection.cpp +0 -27
  167. data/src/LargeImageData.cpp +0 -215
  168. data/src/LargeImageData.hpp +0 -39
  169. data/src/Log.hpp +0 -19
  170. data/src/RubyGosu.cxx +0 -13100
  171. data/src/RubyGosu.h +0 -49
  172. data/src/WinUtility.cpp +0 -61
  173. data/src/WinUtility.hpp +0 -27
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1633167d9fbc9fa4eaf8ce2f15763f07122299c8f1f41fc14237174b0f00184f
4
- data.tar.gz: aa1fba4f1d5ca11ff555232aa8cd66cca8031e5b831f8f7fc01bb8c7618c1544
3
+ metadata.gz: de41d69b5cfd72bea1af496ef95e39cf80d89268d640548c73aeb421d9b05428
4
+ data.tar.gz: d2196d8e0a7f65e9c0d77fdfe5c56026570a807a15b4c46a7066c16bc296fcb0
5
5
  SHA512:
6
- metadata.gz: 4e36daba8fc9ae286150dadf5a8e07d59cbd1d13e7058313b72cfff489987b7babc99fc80013b69a16ab2a76056f3c8e914e96fa89c7ce6bf175de92c71658e7
7
- data.tar.gz: ba3b1fed78d1c9affff3c68daffcf440612747315f21016a0e49357c87476b42e3395bb9fe063bb697aeacdd3664377a7ce0723cab262f30fd4819a553a8fbeb
6
+ metadata.gz: c809f58dd0e31ec02bd3c596e2dab1de6795d70eee53aa5226389815f8b37089289055222ed3f1a4eed3a1f2e4952e452a42042a14385e97737007adbf1dff78
7
+ data.tar.gz: 744c254d6ad35c6ceb9acbda0ac26d1d6f4531df389b38c13afea1775bf271be65941076fdc40d707c55a1c1a8a6ac3ae6ed95231c0a7de5bd11dc041bc0cce8
data/COPYING CHANGED
@@ -1,4 +1,5 @@
1
- Copyright (C) 2001-2021 Julian Raschke, Jan Lücker and all contributors.
1
+ Copyright (C) 2001-2023 Julian Raschke, Jan Lücker, cyberarm, and all
2
+ other contributors: https://github.com/gosu/gosu/graphs/contributors
2
3
 
3
4
  Permission is hereby granted, free of charge, to any person obtaining a
4
5
  copy of this software and associated documentation files (the "Software"),
@@ -55,6 +55,8 @@ assert can have unique static variables associated with it.
55
55
  #define SDL_TriggerBreakpoint() __builtin_debugtrap()
56
56
  #elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
57
57
  #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
58
+ #elif (defined(__GNUC__) || defined(__clang__)) && defined(__riscv)
59
+ #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "ebreak\n\t" )
58
60
  #elif ( defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */
59
61
  #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
60
62
  #elif defined(__APPLE__) && defined(__arm__)
@@ -240,7 +240,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
240
240
  /* "REP NOP" is PAUSE, coded for tools that don't know it by that name. */
241
241
  #if (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))
242
242
  #define SDL_CPUPauseInstruction() __asm__ __volatile__("pause\n") /* Some assemblers can't do REP NOP, so go with PAUSE. */
243
- #elif (defined(__arm__) && __ARM_ARCH >= 7) || defined(__aarch64__)
243
+ #elif (defined(__arm__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7) || defined(__aarch64__)
244
244
  #define SDL_CPUPauseInstruction() __asm__ __volatile__("yield" ::: "memory")
245
245
  #elif (defined(__powerpc__) || defined(__powerpc64__))
246
246
  #define SDL_CPUPauseInstruction() __asm__ __volatile__("or 27,27,27");
@@ -249,9 +249,8 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
249
249
  #elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64))
250
250
  #define SDL_CPUPauseInstruction() __yield()
251
251
  #elif defined(__WATCOMC__) && defined(__386__)
252
- /* watcom assembler rejects PAUSE if CPU < i686, and it refuses REP NOP as an invalid combination. Hardcode the bytes. */
253
252
  extern __inline void SDL_CPUPauseInstruction(void);
254
- #pragma aux SDL_CPUPauseInstruction = "db 0f3h,90h"
253
+ #pragma aux SDL_CPUPauseInstruction = ".686p" ".xmm2" "pause"
255
254
  #else
256
255
  #define SDL_CPUPauseInstruction()
257
256
  #endif
@@ -169,13 +169,13 @@ typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,
169
169
  * The calculated values in this structure are calculated by SDL_OpenAudio().
170
170
  *
171
171
  * For multi-channel audio, the default SDL channel mapping is:
172
- * 2: FL FR (stereo)
173
- * 3: FL FR LFE (2.1 surround)
174
- * 4: FL FR BL BR (quad)
175
- * 5: FL FR LFE BL BR (4.1 surround)
176
- * 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR)
177
- * 7: FL FR FC LFE BC SL SR (6.1 surround)
178
- * 8: FL FR FC LFE BL BR SL SR (7.1 surround)
172
+ * 2: FL FR (stereo)
173
+ * 3: FL FR LFE (2.1 surround)
174
+ * 4: FL FR BL BR (quad)
175
+ * 5: FL FR LFE BL BR (4.1 surround)
176
+ * 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR)
177
+ * 7: FL FR FC LFE BC SL SR (6.1 surround)
178
+ * 8: FL FR FC LFE BL BR SL SR (7.1 surround)
179
179
  */
180
180
  typedef struct SDL_AudioSpec
181
181
  {
@@ -52,7 +52,7 @@ typedef enum
52
52
  dstA = dstA */
53
53
  SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply
54
54
  dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA))
55
- dstA = (srcA * dstA) + (dstA * (1-srcA)) */
55
+ dstA = dstA */
56
56
  SDL_BLENDMODE_INVALID = 0x7FFFFFFF
57
57
 
58
58
  /* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */
@@ -140,7 +140,7 @@ extern "C" {
140
140
 
141
141
  #if HAS_BUILTIN_BSWAP16
142
142
  #define SDL_Swap16(x) __builtin_bswap16(x)
143
- #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
143
+ #elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL)
144
144
  #pragma intrinsic(_byteswap_ushort)
145
145
  #define SDL_Swap16(x) _byteswap_ushort(x)
146
146
  #elif defined(__i386__) && !HAS_BROKEN_BSWAP
@@ -189,7 +189,7 @@ SDL_Swap16(Uint16 x)
189
189
 
190
190
  #if HAS_BUILTIN_BSWAP32
191
191
  #define SDL_Swap32(x) __builtin_bswap32(x)
192
- #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
192
+ #elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL)
193
193
  #pragma intrinsic(_byteswap_ulong)
194
194
  #define SDL_Swap32(x) _byteswap_ulong(x)
195
195
  #elif defined(__i386__) && !HAS_BROKEN_BSWAP
@@ -241,7 +241,7 @@ SDL_Swap32(Uint32 x)
241
241
 
242
242
  #if HAS_BUILTIN_BSWAP64
243
243
  #define SDL_Swap64(x) __builtin_bswap64(x)
244
- #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
244
+ #elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL)
245
245
  #pragma intrinsic(_byteswap_uint64)
246
246
  #define SDL_Swap64(x) _byteswap_uint64(x)
247
247
  #elif defined(__i386__) && !HAS_BROKEN_BSWAP
@@ -724,10 +724,10 @@ typedef enum
724
724
  SDL_CONTROLLER_BUTTON_DPAD_LEFT,
725
725
  SDL_CONTROLLER_BUTTON_DPAD_RIGHT,
726
726
  SDL_CONTROLLER_BUTTON_MISC1, /* Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button */
727
- SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 */
728
- SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 */
729
- SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 */
730
- SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 */
727
+ SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 (upper left, facing the back) */
728
+ SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 (upper right, facing the back) */
729
+ SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 (lower left, facing the back) */
730
+ SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 (lower right, facing the back) */
731
731
  SDL_CONTROLLER_BUTTON_TOUCHPAD, /* PS4/PS5 touchpad button */
732
732
  SDL_CONTROLLER_BUTTON_MAX
733
733
  } SDL_GameControllerButton;
@@ -92,7 +92,7 @@ extern "C" {
92
92
  * By default this hint is not set and the APK expansion files are not searched.
93
93
  */
94
94
  #define SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION"
95
-
95
+
96
96
  /**
97
97
  * \brief Android APK expansion patch file version. Should be a string number like "1", "2" etc.
98
98
  *
@@ -132,13 +132,13 @@ extern "C" {
132
132
  * \brief A variable to control whether we trap the Android back button to handle it manually.
133
133
  * This is necessary for the right mouse button to work on some Android devices, or
134
134
  * to be able to trap the back button for use in your code reliably. If set to true,
135
- * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of
135
+ * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of
136
136
  * SDL_SCANCODE_AC_BACK.
137
137
  *
138
138
  * The variable can be set to the following values:
139
139
  * "0" - Back button will be handled as usual for system. (default)
140
140
  * "1" - Back button will be trapped, allowing you to handle the key press
141
- * manually. (This will also let right mouse click work on systems
141
+ * manually. (This will also let right mouse click work on systems
142
142
  * where the right mouse button functions as back.)
143
143
  *
144
144
  * The value of this hint is used at runtime, so it can be changed at any time.
@@ -147,7 +147,7 @@ extern "C" {
147
147
 
148
148
  /**
149
149
  * \brief Specify an application name.
150
- *
150
+ *
151
151
  * This hint lets you specify the application name sent to the OS when
152
152
  * required. For example, this will often appear in volume control applets for
153
153
  * audio streams, and in lists of applications which are inhibiting the
@@ -377,6 +377,17 @@ extern "C" {
377
377
  */
378
378
  #define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
379
379
 
380
+ /**
381
+ * \brief A variable that controls whether the on-screen keyboard should be shown when text input is active
382
+ *
383
+ * The variable can be set to the following values:
384
+ * "0" - Do not show the on-screen keyboard
385
+ * "1" - Show the on-screen keyboard
386
+ *
387
+ * The default value is "1". This hint must be set before text input is activated.
388
+ */
389
+ #define SDL_HINT_ENABLE_SCREEN_KEYBOARD "SDL_ENABLE_SCREEN_KEYBOARD"
390
+
380
391
  /**
381
392
  * \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs
382
393
  *
@@ -507,7 +518,7 @@ extern "C" {
507
518
 
508
519
  /**
509
520
  * \brief If set, game controller face buttons report their values according to their labels instead of their positional layout.
510
- *
521
+ *
511
522
  * For example, on Nintendo Switch controllers, normally you'd get:
512
523
  *
513
524
  * (Y)
@@ -569,9 +580,9 @@ extern "C" {
569
580
  *
570
581
  * The variable can be set to the following values:
571
582
  * "0" - SDL_TEXTEDITING events are sent, and it is the application's
572
- * responsibility to render the text from these events and
583
+ * responsibility to render the text from these events and
573
584
  * differentiate it somehow from committed text. (default)
574
- * "1" - If supported by the IME then SDL_TEXTEDITING events are not sent,
585
+ * "1" - If supported by the IME then SDL_TEXTEDITING events are not sent,
575
586
  * and text that is being composed will be rendered in its own UI.
576
587
  */
577
588
  #define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING"
@@ -996,6 +1007,15 @@ extern "C" {
996
1007
  */
997
1008
  #define SDL_HINT_JOYSTICK_THREAD "SDL_JOYSTICK_THREAD"
998
1009
 
1010
+ /**
1011
+ * \brief A variable controlling whether Windows.Gaming.Input should be used for controller handling.
1012
+ *
1013
+ * This variable can be set to the following values:
1014
+ * "0" - WGI is not used
1015
+ * "1" - WGI is used (the default)
1016
+ */
1017
+ #define SDL_HINT_JOYSTICK_WGI "SDL_JOYSTICK_WGI"
1018
+
999
1019
  /**
1000
1020
  * \brief Determines whether SDL enforces that DRM master is required in order
1001
1021
  * to initialize the KMSDRM video backend.
@@ -1310,6 +1330,8 @@ extern "C" {
1310
1330
  *
1311
1331
  * This variable can be one of the following values:
1312
1332
  * "primary" (default), "portrait", "landscape", "inverted-portrait", "inverted-landscape"
1333
+ *
1334
+ * Since SDL 2.0.22 this variable accepts a comma-separated list of values above.
1313
1335
  */
1314
1336
  #define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION "SDL_QTWAYLAND_CONTENT_ORIENTATION"
1315
1337
 
@@ -1452,6 +1474,17 @@ extern "C" {
1452
1474
  */
1453
1475
  #define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
1454
1476
 
1477
+ /**
1478
+ * \brief A variable controlling whether the Metal render driver select low power device over default one
1479
+ *
1480
+ * This variable can be set to the following values:
1481
+ * "0" - Use the prefered OS device
1482
+ * "1" - Select a low power one
1483
+ *
1484
+ * By default the prefered OS device is used.
1485
+ */
1486
+ #define SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE"
1487
+
1455
1488
  /**
1456
1489
  * \brief A variable controlling if VSYNC is automatically disable if doesn't reach the enough FPS
1457
1490
  *
@@ -1495,7 +1528,7 @@ extern "C" {
1495
1528
  * disabled. You should use a string that describes what your program is doing
1496
1529
  * (and, therefore, why the screensaver is disabled). For example, "Playing a
1497
1530
  * game" or "Watching a video".
1498
- *
1531
+ *
1499
1532
  * Setting this to "" or leaving it unset will have SDL use a reasonable
1500
1533
  * default: "Playing a game" or something similar.
1501
1534
  *
@@ -1509,13 +1542,13 @@ extern "C" {
1509
1542
  * On some platforms, like Linux, a realtime priority thread may be subject to restrictions
1510
1543
  * that require special handling by the application. This hint exists to let SDL know that
1511
1544
  * the app is prepared to handle said restrictions.
1512
- *
1545
+ *
1513
1546
  * On Linux, SDL will apply the following configuration to any thread that becomes realtime:
1514
1547
  * * The SCHED_RESET_ON_FORK bit will be set on the scheduling policy,
1515
1548
  * * An RLIMIT_RTTIME budget will be configured to the rtkit specified limit.
1516
1549
  * * Exceeding this limit will result in the kernel sending SIGKILL to the app,
1517
1550
  * * Refer to the man pages for more information.
1518
- *
1551
+ *
1519
1552
  * This variable can be set to the following values:
1520
1553
  * "0" - default platform specific behaviour
1521
1554
  * "1" - Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling policy
@@ -1603,7 +1636,7 @@ extern "C" {
1603
1636
  #define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK"
1604
1637
 
1605
1638
  /**
1606
- * \brief A variable controlling whether the screensaver is enabled.
1639
+ * \brief A variable controlling whether the screensaver is enabled.
1607
1640
  *
1608
1641
  * This variable can be set to the following values:
1609
1642
  * "0" - Disable screensaver
@@ -1616,7 +1649,7 @@ extern "C" {
1616
1649
  /**
1617
1650
  * \brief Tell the video driver that we only want a double buffer.
1618
1651
  *
1619
- * By default, most lowlevel 2D APIs will use a triple buffer scheme that
1652
+ * By default, most lowlevel 2D APIs will use a triple buffer scheme that
1620
1653
  * wastes no CPU time on waiting for vsync after issuing a flip, but
1621
1654
  * introduces a frame of latency. On the other hand, using a double buffer
1622
1655
  * scheme instead is recommended for cases where low latency is an important
@@ -1747,9 +1780,9 @@ extern "C" {
1747
1780
 
1748
1781
  /**
1749
1782
  * \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p").
1750
- *
1783
+ *
1751
1784
  * If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has
1752
- * SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly
1785
+ * SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly
1753
1786
  * created SDL_Window:
1754
1787
  *
1755
1788
  * 1. Its pixel format will be set to the same pixel format as this SDL_Window. This is
@@ -1815,13 +1848,13 @@ extern "C" {
1815
1848
 
1816
1849
  /**
1817
1850
  * \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used.
1818
- *
1851
+ *
1819
1852
  * This variable can be set to the following values:
1820
1853
  * "0" - Disable _NET_WM_BYPASS_COMPOSITOR
1821
1854
  * "1" - Enable _NET_WM_BYPASS_COMPOSITOR
1822
- *
1855
+ *
1823
1856
  * By default SDL will use _NET_WM_BYPASS_COMPOSITOR
1824
- *
1857
+ *
1825
1858
  */
1826
1859
  #define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
1827
1860
 
@@ -1955,7 +1988,29 @@ extern "C" {
1955
1988
  #define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
1956
1989
 
1957
1990
  /**
1958
- * \brief A variable controlling whether the windows message loop is processed by SDL
1991
+ * \brief Controls whether menus can be opened with their keyboard shortcut (Alt+mnemonic).
1992
+ *
1993
+ * If the mnemonics are enabled, then menus can be opened by pressing the Alt
1994
+ * key and the corresponding mnemonic (for example, Alt+F opens the File menu).
1995
+ * However, in case an invalid mnemonic is pressed, Windows makes an audible
1996
+ * beep to convey that nothing happened. This is true even if the window has
1997
+ * no menu at all!
1998
+ *
1999
+ * Because most SDL applications don't have menus, and some want to use the Alt
2000
+ * key for other purposes, SDL disables mnemonics (and the beeping) by default.
2001
+ *
2002
+ * Note: This also affects keyboard events: with mnemonics enabled, when a
2003
+ * menu is opened from the keyboard, you will not receive a KEYUP event for
2004
+ * the mnemonic key, and *might* not receive one for Alt.
2005
+ *
2006
+ * This variable can be set to the following values:
2007
+ * "0" - Alt+mnemonic does nothing, no beeping. (default)
2008
+ * "1" - Alt+mnemonic opens menus, invalid mnemonics produce a beep.
2009
+ */
2010
+ #define SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS "SDL_WINDOWS_ENABLE_MENU_MNEMONICS"
2011
+
2012
+ /**
2013
+ * \brief A variable controlling whether the windows message loop is processed by SDL
1959
2014
  *
1960
2015
  * This variable can be set to the following values:
1961
2016
  * "0" - The window message loop is not run
@@ -1996,7 +2051,7 @@ extern "C" {
1996
2051
  #define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"
1997
2052
 
1998
2053
  /**
1999
- * \brief A variable to specify custom icon resource id from RC file on Windows platform
2054
+ * \brief A variable to specify custom icon resource id from RC file on Windows platform
2000
2055
  */
2001
2056
  #define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON"
2002
2057
  #define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL"
@@ -2035,16 +2090,16 @@ extern "C" {
2035
2090
  *
2036
2091
  * This hint must be set before initializing the video subsystem.
2037
2092
  *
2038
- * The main purpose of declaring DPI awareness is to disable OS bitmap scaling of SDL windows on monitors with
2093
+ * The main purpose of declaring DPI awareness is to disable OS bitmap scaling of SDL windows on monitors with
2039
2094
  * a DPI scale factor.
2040
- *
2095
+ *
2041
2096
  * This hint is equivalent to requesting DPI awareness via external means (e.g. calling SetProcessDpiAwarenessContext)
2042
2097
  * and does not cause SDL to use a virtualized coordinate system, so it will generally give you 1 SDL coordinate = 1 pixel
2043
2098
  * even on high-DPI displays.
2044
- *
2099
+ *
2045
2100
  * For more information, see:
2046
2101
  * https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows
2047
- *
2102
+ *
2048
2103
  * This variable can be set to the following values:
2049
2104
  * "" - Do not change the DPI awareness (default).
2050
2105
  * "unaware" - Declare the process as DPI unaware. (Windows 8.1 and later).
@@ -2062,16 +2117,16 @@ extern "C" {
2062
2117
 
2063
2118
  /**
2064
2119
  * \brief Uses DPI-scaled points as the SDL coordinate system on Windows.
2065
- *
2120
+ *
2066
2121
  * This changes the SDL coordinate system units to be DPI-scaled points, rather than pixels everywhere.
2067
2122
  * This means windows will be appropriately sized, even when created on high-DPI displays with scaling.
2068
- *
2123
+ *
2069
2124
  * e.g. requesting a 640x480 window from SDL, on a display with 125% scaling in Windows display settings,
2070
2125
  * will create a window with an 800x600 client area (in pixels).
2071
2126
  *
2072
2127
  * Setting this to "1" implicitly requests process DPI awareness (setting SDL_WINDOWS_DPI_AWARENESS is unnecessary),
2073
2128
  * and forces SDL_WINDOW_ALLOW_HIGHDPI on all windows.
2074
- *
2129
+ *
2075
2130
  * This variable can be set to the following values:
2076
2131
  * "0" - SDL coordinates equal Windows coordinates. No automatic window resizing when dragging
2077
2132
  * between monitors with different scale factors (unless this is performed by
@@ -2082,7 +2137,7 @@ extern "C" {
2082
2137
  #define SDL_HINT_WINDOWS_DPI_SCALING "SDL_WINDOWS_DPI_SCALING"
2083
2138
 
2084
2139
  /**
2085
- * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden
2140
+ * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden
2086
2141
  *
2087
2142
  * This variable can be set to the following values:
2088
2143
  * "0" - The window frame is not interactive when the cursor is hidden (no move, resize, etc)
@@ -2093,7 +2148,7 @@ extern "C" {
2093
2148
  #define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
2094
2149
 
2095
2150
  /**
2096
- * \brief A variable controlling whether the window is activated when the SDL_ShowWindow function is called
2151
+ * \brief A variable controlling whether the window is activated when the SDL_ShowWindow function is called
2097
2152
  *
2098
2153
  * This variable can be set to the following values:
2099
2154
  * "0" - The window is activated when the SDL_ShowWindow function is called
@@ -44,6 +44,7 @@
44
44
  #include "SDL_stdinc.h"
45
45
  #include "SDL_error.h"
46
46
  #include "SDL_guid.h"
47
+ #include "SDL_mutex.h"
47
48
 
48
49
  #include "begin_code.h"
49
50
  /* Set up for C function definitions, even when using C++ */
@@ -66,6 +67,9 @@ extern "C" {
66
67
  /**
67
68
  * The joystick structure used to identify an SDL joystick
68
69
  */
70
+ #ifdef SDL_THREAD_SAFETY_ANALYSIS
71
+ extern SDL_mutex *SDL_joystick_lock;
72
+ #endif
69
73
  struct _SDL_Joystick;
70
74
  typedef struct _SDL_Joystick SDL_Joystick;
71
75
 
@@ -131,7 +135,7 @@ typedef enum
131
135
  *
132
136
  * \since This function is available since SDL 2.0.7.
133
137
  */
134
- extern DECLSPEC void SDLCALL SDL_LockJoysticks(void);
138
+ extern DECLSPEC void SDLCALL SDL_LockJoysticks(void) SDL_ACQUIRE(SDL_joystick_lock);
135
139
 
136
140
 
137
141
  /**
@@ -146,7 +150,7 @@ extern DECLSPEC void SDLCALL SDL_LockJoysticks(void);
146
150
  *
147
151
  * \since This function is available since SDL 2.0.7.
148
152
  */
149
- extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void);
153
+ extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void) SDL_RELEASE(SDL_joystick_lock);
150
154
 
151
155
  /**
152
156
  * Count the number of joysticks attached to the system.
@@ -284,13 +288,12 @@ extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_in
284
288
  /**
285
289
  * Get the instance ID of a joystick.
286
290
  *
287
- * This can be called before any joysticks are opened. If the index is out of
288
- * range, this function will return -1.
291
+ * This can be called before any joysticks are opened.
289
292
  *
290
293
  * \param device_index the index of the joystick to query (the N'th joystick
291
294
  * on the system
292
295
  * \returns the instance id of the selected joystick. If called on an invalid
293
- * index, this function returns zero
296
+ * index, this function returns -1.
294
297
  *
295
298
  * \since This function is available since SDL 2.0.6.
296
299
  */
@@ -40,7 +40,7 @@
40
40
  * an SDLK_* constant for those keys that do not generate characters.
41
41
  *
42
42
  * A special exception is the number keys at the top of the keyboard which
43
- * always map to SDLK_0...SDLK_9, regardless of layout.
43
+ * map to SDLK_0...SDLK_9 on AZERTY layouts.
44
44
  */
45
45
  typedef Sint32 SDL_Keycode;
46
46
 
@@ -263,6 +263,13 @@ extern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_fun
263
263
  */
264
264
  extern DECLSPEC int SDLCALL SDL_GDKRunApp(SDL_main_func mainFunction, void *reserved);
265
265
 
266
+ /**
267
+ * Callback from the application to let the suspend continue.
268
+ *
269
+ * \since This function is available since SDL 2.28.0.
270
+ */
271
+ extern DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void);
272
+
266
273
  #endif /* __GDK__ */
267
274
 
268
275
  #ifdef __cplusplus
@@ -198,13 +198,9 @@ extern DECLSPEC int SDLCALL SDL_WarpMouseGlobal(int x, int y);
198
198
  /**
199
199
  * Set relative mouse mode.
200
200
  *
201
- * While the mouse is in relative mode, the cursor is hidden, and the driver
202
- * will try to report continuous motion in the current window. Only relative
203
- * motion events will be delivered, the mouse position will not change.
204
- *
205
- * Note that this function will not be able to provide continuous relative
206
- * motion when used over Microsoft Remote Desktop, instead motion is limited
207
- * to the bounds of the screen.
201
+ * While the mouse is in relative mode, the cursor is hidden, the mouse
202
+ * position is constrained to the window, and SDL will report continuous
203
+ * relative mouse motion even if the mouse is at the edge of the window.
208
204
  *
209
205
  * This function will flush any pending mouse motion.
210
206
  *
@@ -389,6 +385,9 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
389
385
  /**
390
386
  * Get the default cursor.
391
387
  *
388
+ * You do not have to call SDL_FreeCursor() on the return value, but it is
389
+ * safe to do so.
390
+ *
392
391
  * \returns the default cursor on success or NULL on failure.
393
392
  *
394
393
  * \since This function is available since SDL 2.0.0.
@@ -31,6 +31,80 @@
31
31
  #include "SDL_stdinc.h"
32
32
  #include "SDL_error.h"
33
33
 
34
+ /******************************************************************************/
35
+ /* Enable thread safety attributes only with clang.
36
+ * The attributes can be safely erased when compiling with other compilers.
37
+ */
38
+ #if defined(SDL_THREAD_SAFETY_ANALYSIS) && \
39
+ defined(__clang__) && (!defined(SWIG))
40
+ #define SDL_THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x))
41
+ #else
42
+ #define SDL_THREAD_ANNOTATION_ATTRIBUTE__(x) /* no-op */
43
+ #endif
44
+
45
+ #define SDL_CAPABILITY(x) \
46
+ SDL_THREAD_ANNOTATION_ATTRIBUTE__(capability(x))
47
+
48
+ #define SDL_SCOPED_CAPABILITY \
49
+ SDL_THREAD_ANNOTATION_ATTRIBUTE__(scoped_lockable)
50
+
51
+ #define SDL_GUARDED_BY(x) \
52
+ SDL_THREAD_ANNOTATION_ATTRIBUTE__(guarded_by(x))
53
+
54
+ #define SDL_PT_GUARDED_BY(x) \
55
+ SDL_THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded_by(x))
56
+
57
+ #define SDL_ACQUIRED_BEFORE(x) \
58
+ SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquired_before(x))
59
+
60
+ #define SDL_ACQUIRED_AFTER(x) \
61
+ SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquired_after(x))
62
+
63
+ #define SDL_REQUIRES(x) \
64
+ SDL_THREAD_ANNOTATION_ATTRIBUTE__(requires_capability(x))
65
+
66
+ #define SDL_REQUIRES_SHARED(x) \
67
+ SDL_THREAD_ANNOTATION_ATTRIBUTE__(requires_shared_capability(x))
68
+
69
+ #define SDL_ACQUIRE(x) \
70
+ SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquire_capability(x))
71
+
72
+ #define SDL_ACQUIRE_SHARED(x) \
73
+ SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquire_shared_capability(x))
74
+
75
+ #define SDL_RELEASE(x) \
76
+ SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_capability(x))
77
+
78
+ #define SDL_RELEASE_SHARED(x) \
79
+ SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_shared_capability(x))
80
+
81
+ #define SDL_RELEASE_GENERIC(x) \
82
+ SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_generic_capability(x))
83
+
84
+ #define SDL_TRY_ACQUIRE(x, y) \
85
+ SDL_THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_capability(x, y))
86
+
87
+ #define SDL_TRY_ACQUIRE_SHARED(x, y) \
88
+ SDL_THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_shared_capability(x, y))
89
+
90
+ #define SDL_EXCLUDES(x) \
91
+ SDL_THREAD_ANNOTATION_ATTRIBUTE__(locks_excluded(x))
92
+
93
+ #define SDL_ASSERT_CAPABILITY(x) \
94
+ SDL_THREAD_ANNOTATION_ATTRIBUTE__(assert_capability(x))
95
+
96
+ #define SDL_ASSERT_SHARED_CAPABILITY(x) \
97
+ SDL_THREAD_ANNOTATION_ATTRIBUTE__(assert_shared_capability(x))
98
+
99
+ #define SDL_RETURN_CAPABILITY(x) \
100
+ SDL_THREAD_ANNOTATION_ATTRIBUTE__(lock_returned(x))
101
+
102
+ #define SDL_NO_THREAD_SAFETY_ANALYSIS \
103
+ SDL_THREAD_ANNOTATION_ATTRIBUTE__(no_thread_safety_analysis)
104
+
105
+ /******************************************************************************/
106
+
107
+
34
108
  #include "begin_code.h"
35
109
  /* Set up for C function definitions, even when using C++ */
36
110
  #ifdef __cplusplus
@@ -96,7 +170,7 @@ extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void);
96
170
  *
97
171
  * \since This function is available since SDL 2.0.0.
98
172
  */
99
- extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex);
173
+ extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex) SDL_ACQUIRE(mutex);
100
174
  #define SDL_mutexP(m) SDL_LockMutex(m)
101
175
 
102
176
  /**
@@ -119,7 +193,7 @@ extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex);
119
193
  * \sa SDL_LockMutex
120
194
  * \sa SDL_UnlockMutex
121
195
  */
122
- extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex);
196
+ extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex) SDL_TRY_ACQUIRE(0, mutex);
123
197
 
124
198
  /**
125
199
  * Unlock the mutex.
@@ -138,7 +212,7 @@ extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex);
138
212
  *
139
213
  * \since This function is available since SDL 2.0.0.
140
214
  */
141
- extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex);
215
+ extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex) SDL_RELEASE(mutex);
142
216
  #define SDL_mutexV(m) SDL_UnlockMutex(m)
143
217
 
144
218
  /**
@@ -276,7 +350,7 @@ extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);
276
350
  * successful it will atomically decrement the semaphore value.
277
351
  *
278
352
  * \param sem the semaphore to wait on
279
- * \param ms the length of the timeout, in milliseconds
353
+ * \param timeout the length of the timeout, in milliseconds
280
354
  * \returns 0 if the wait succeeds, `SDL_MUTEX_TIMEDOUT` if the wait does not
281
355
  * succeed in the allotted time, or a negative error code on failure;
282
356
  * call SDL_GetError() for more information.
@@ -290,7 +364,7 @@ extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);
290
364
  * \sa SDL_SemValue
291
365
  * \sa SDL_SemWait
292
366
  */
293
- extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);
367
+ extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout);
294
368
 
295
369
  /**
296
370
  * Atomically increment a semaphore's value and wake waiting threads.
@@ -1,4 +1,8 @@
1
- #ifndef __gl_glext_h_
1
+ /* SDL modified the include guard to be compatible with Mesa and Apple include guards:
2
+ * - Mesa uses: __gl_glext_h_
3
+ * - Apple uses: __glext_h_ */
4
+ #if !defined(__glext_h_) && !defined(__gl_glext_h_)
5
+ #define __glext_h_ 1
2
6
  #define __gl_glext_h_ 1
3
7
 
4
8
  #ifdef __cplusplus