From d83fa92d58129cbbd4e2efea2db6cfa908b16c47 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 3 Dec 2025 20:50:59 -0800
Subject: [PATCH] Added notes on main callbacks with other language bindings
---
docs/README-main-functions.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/docs/README-main-functions.md b/docs/README-main-functions.md
index 75b9e2cc04e7e..16ec9c5d2ee3e 100644
--- a/docs/README-main-functions.md
+++ b/docs/README-main-functions.md
@@ -205,6 +205,13 @@ data, as this pointer will not be provided to your app again.
The SDL_AppResult value that terminated the app is provided here, in case
it's useful to know if this was a successful or failing run of the app.
+## Implementing main callbacks for other languages
+
+If you're writing language bindings for SDL and want to provide the main
+callback functionality, you should call SDL_EnterAppMainCallbacks() and pass it
+the arguments and callback functions that you want called during the program
+execution. This function will call the init, event, and iterate functions and
+then once the application is done, will call the quit callback and return.
## Summary and Best Practices