Skip to content

Commit ef4ccc7

Browse files
committed
Deploy docs with binding status: Fix linux linking (#5)
* These macros in SDL_Atomic need wrappers Macros can't be called from the FFI directly * Remove SDL_IsTraySupported It was removed in SDL itself. See: libsdl-org/SDL#13663 * Wrap macro SDL_TriggerBreakpoint 7a3b8a8
1 parent a029452 commit ef4ccc7

8 files changed

Lines changed: 167 additions & 44 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,16 +234,16 @@ These examples are based off of the original [SDL3 GPU Examples](https://github.
234234
235235
## 📊 Binding Status
236236
237-
*Last updated: 2025-08-20 18:40 UTC*
237+
*Last updated: 2025-09-24 21:18 UTC*
238238
239239
*SDL3 commit: `e1a623f129e75ad532315852d656fb26c80382a6`*
240240
241241
### Summary
242242
- **Total Modules**: 55
243243
- **Modules with Bindings**: 55
244-
- **Complete Bindings**: 55
245-
- **Missing Functions**: 0
246-
- **Completion Rate**: 100%
244+
- **Complete Bindings**: 54
245+
- **Missing Functions**: 1
246+
- **Completion Rate**: 98%
247247
248248
### Status by Module
249249
@@ -300,7 +300,7 @@ These examples are based off of the original [SDL3 GPU Examples](https://github.
300300
| `SDL_time` | ✅ Complete |
301301
| `SDL_timer` | ✅ Complete |
302302
| `SDL_touch` | ✅ Complete |
303-
| `SDL_tray` | ✅ Complete |
303+
| `SDL_tray` | ⚠️ 1 missing |
304304
| `SDL_version` | ✅ Complete |
305305
| `SDL_video` | ✅ Complete |
306306
| `SDL_vulkan` | ✅ Complete |

cbits/helpers.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,12 @@ void* wrapper_SDL_GetWindowICCProfile(SDL_Window *window, size_t *size) {
6767
SDL_free(profile);
6868
return copy;
6969
}
70+
71+
// Wrappers for macros in SDL_Atomic
72+
void wrapper_SDL_CompilerBarrier(void) { SDL_CompilerBarrier(); }
73+
void wrapper_SDL_MemoryBarrierAcquire(void) { SDL_MemoryBarrierAcquire(); }
74+
void wrapper_SDL_MemoryBarrierRelease(void) { SDL_MemoryBarrierRelease(); }
75+
void wrapper_SDL_CPUPauseInstruction(void) { SDL_CPUPauseInstruction(); }
76+
77+
// Wrappers for macros in SDL_Assert
78+
void wrapper_SDL_TriggerBreakpoint(void) { SDL_TriggerBreakpoint(); }

index.html

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -280,16 +280,16 @@ <h3 id="hardware">Hardware</h3>
280280
access (Can't test properly but compiles.)</li>
281281
</ul>
282282
<h2 id="-binding-status">📊 Binding Status</h2>
283-
<p><em>Last updated: 2025-08-20 18:40 UTC</em></p>
283+
<p><em>Last updated: 2025-09-24 21:18 UTC</em></p>
284284
<p><em>SDL3 commit:
285285
<code>e1a623f129e75ad532315852d656fb26c80382a6</code></em></p>
286286
<h3 id="summary">Summary</h3>
287287
<ul>
288288
<li><strong>Total Modules</strong>: 55</li>
289289
<li><strong>Modules with Bindings</strong>: 55</li>
290-
<li><strong>Complete Bindings</strong>: 55</li>
291-
<li><strong>Missing Functions</strong>: 0</li>
292-
<li><strong>Completion Rate</strong>: 100%</li>
290+
<li><strong>Complete Bindings</strong>: 54</li>
291+
<li><strong>Missing Functions</strong>: 1</li>
292+
<li><strong>Completion Rate</strong>: 98%</li>
293293
</ul>
294294
<h3 id="status-by-module">Status by Module</h3>
295295
<table>
@@ -506,7 +506,7 @@ <h3 id="status-by-module">Status by Module</h3>
506506
</tr>
507507
<tr class="even">
508508
<td><code>SDL_tray</code></td>
509-
<td>✅ Complete</td>
509+
<td>⚠️ 1 missing</td>
510510
</tr>
511511
<tr class="odd">
512512
<td><code>SDL_version</code></td>
@@ -825,16 +825,16 @@ <h3 id="hardware">Hardware</h3>
825825
access (Can't test properly but compiles.)</li>
826826
</ul>
827827
<h2 id="-binding-status">📊 Binding Status</h2>
828-
<p><em>Last updated: 2025-08-20 18:40 UTC</em></p>
828+
<p><em>Last updated: 2025-09-24 21:18 UTC</em></p>
829829
<p><em>SDL3 commit:
830830
<code>e1a623f129e75ad532315852d656fb26c80382a6</code></em></p>
831831
<h3 id="summary">Summary</h3>
832832
<ul>
833833
<li><strong>Total Modules</strong>: 55</li>
834834
<li><strong>Modules with Bindings</strong>: 55</li>
835-
<li><strong>Complete Bindings</strong>: 55</li>
836-
<li><strong>Missing Functions</strong>: 0</li>
837-
<li><strong>Completion Rate</strong>: 100%</li>
835+
<li><strong>Complete Bindings</strong>: 54</li>
836+
<li><strong>Missing Functions</strong>: 1</li>
837+
<li><strong>Completion Rate</strong>: 98%</li>
838838
</ul>
839839
<h3 id="status-by-module">Status by Module</h3>
840840
<table>
@@ -1051,7 +1051,7 @@ <h3 id="status-by-module">Status by Module</h3>
10511051
</tr>
10521052
<tr class="even">
10531053
<td><code>SDL_tray</code></td>
1054-
<td>✅ Complete</td>
1054+
<td>⚠️ 1 missing</td>
10551055
</tr>
10561056
<tr class="odd">
10571057
<td><code>SDL_version</code></td>
@@ -1505,16 +1505,16 @@ <h3 id="hardware">Hardware</h3>
15051505
access (Can't test properly but compiles.)</li>
15061506
</ul>
15071507
<h2 id="-binding-status">📊 Binding Status</h2>
1508-
<p><em>Last updated: 2025-08-20 18:40 UTC</em></p>
1508+
<p><em>Last updated: 2025-09-24 21:18 UTC</em></p>
15091509
<p><em>SDL3 commit:
15101510
<code>e1a623f129e75ad532315852d656fb26c80382a6</code></em></p>
15111511
<h3 id="summary">Summary</h3>
15121512
<ul>
15131513
<li><strong>Total Modules</strong>: 55</li>
15141514
<li><strong>Modules with Bindings</strong>: 55</li>
1515-
<li><strong>Complete Bindings</strong>: 55</li>
1516-
<li><strong>Missing Functions</strong>: 0</li>
1517-
<li><strong>Completion Rate</strong>: 100%</li>
1515+
<li><strong>Complete Bindings</strong>: 54</li>
1516+
<li><strong>Missing Functions</strong>: 1</li>
1517+
<li><strong>Completion Rate</strong>: 98%</li>
15181518
</ul>
15191519
<h3 id="status-by-module">Status by Module</h3>
15201520
<table>
@@ -1731,7 +1731,7 @@ <h3 id="status-by-module">Status by Module</h3>
17311731
</tr>
17321732
<tr class="even">
17331733
<td><code>SDL_tray</code></td>
1734-
<td>✅ Complete</td>
1734+
<td>⚠️ 1 missing</td>
17351735
</tr>
17361736
<tr class="odd">
17371737
<td><code>SDL_version</code></td>

src/SDL/Assert.hsc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ foreign import ccall unsafe "SDL_ResetAssertionReport"
9898
sdlResetAssertionReport :: IO ()
9999

100100
-- | Attempt to tell an attached debugger to pause
101-
foreign import ccall unsafe "SDL_TriggerBreakpoint"
101+
foreign import ccall unsafe "wrapper_SDL_TriggerBreakpoint"
102102
sdlTriggerBreakpoint :: IO ()
103103

104104
-- | Implementation for SDL_assert as a Haskell function

src/SDL/Atomic.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ foreign import ccall unsafe "SDL_UnlockSpinlock"
9090
-- Memory Barrier Functions
9191

9292
-- | Mark a compiler barrier.
93-
foreign import ccall unsafe "static inline"
93+
foreign import ccall unsafe "wrapper_SDL_CompilerBarrier"
9494
sdlCompilerBarrier :: IO ()
9595

9696
-- | Insert a memory release barrier (function version).
@@ -102,15 +102,15 @@ foreign import ccall unsafe "SDL_MemoryBarrierAcquireFunction"
102102
sdlMemoryBarrierAcquireFunction :: IO ()
103103

104104
-- | Insert a memory release barrier (macro version).
105-
foreign import ccall unsafe "static inline"
105+
foreign import ccall unsafe "wrapper_SDL_MemoryBarrierRelease"
106106
sdlMemoryBarrierRelease :: IO ()
107107

108108
-- | Insert a memory acquire barrier (macro version).
109-
foreign import ccall unsafe "static inline"
109+
foreign import ccall unsafe "wrapper_SDL_MemoryBarrierAcquire"
110110
sdlMemoryBarrierAcquire :: IO ()
111111

112112
-- | Insert a CPU-specific "pause" instruction.
113-
foreign import ccall unsafe "static inline"
113+
foreign import ccall unsafe "wrapper_SDL_CPUPauseInstruction"
114114
sdlCPUPauseInstruction :: IO ()
115115

116116
-- Atomic Integer Functions

0 commit comments

Comments
 (0)