SDL: Added documentation for getting the NSWindow from an SDL window

From 327d31a5d9ea4156a5a5b5afc305a180ca30f1a9 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 28 Dec 2023 16:09:59 -0800
Subject: [PATCH] Added documentation for getting the NSWindow from an SDL
 window

---
 docs/README-migration.md | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/docs/README-migration.md b/docs/README-migration.md
index fb30e16c7c3e..ccf3734b86ce 100644
--- a/docs/README-migration.md
+++ b/docs/README-migration.md
@@ -1210,12 +1210,20 @@ The information previously available in SDL_GetWindowWMInfo() is now available a
     if (hwnd) {
         ...
     }
+#elif defined(__MACOSX__)
+    NSWindow *nswindow = NULL;
+    if (SDL_GetWindowWMInfo(window, &info) && info.subsystem == SDL_SYSWM_COCOA) {
+        nswindow = (__bridge NSWindow *)info.info.cocoa.window;
+    }
+    if (nswindow) {
+        ...
+    }
 #elif defined(__LINUX__)
-    Window xwin = 0;
+    Window xwindow = 0;
     if (SDL_GetWindowWMInfo(window, &info) && info.subsystem == SDL_SYSWM_X11) {
-        xwin = info.info.x11.window;
+        xwindow = info.info.x11.window;
     }
-    if (xwin) {
+    if (xwindow) {
         ...
     }
 #endif
@@ -1227,9 +1235,14 @@ becomes:
     if (hwnd) {
         ...
     }
+#elif defined(__MACOS__)
+    NSWindow *nswindow = (__bridge NSWindow *)SDL_GetProperty(SDL_GetWindowProperties(window), "SDL.window.cocoa.window", NULL);
+    if (nswindow) {
+        ...
+    }
 #elif defined(__LINUX__)
-    Window xwin = (Window)SDL_GetNumberProperty(SDL_GetWindowProperties(window), "SDL.window.x11.window", 0);
-    if (xwin) {
+    Window xwindow = (Window)SDL_GetNumberProperty(SDL_GetWindowProperties(window), "SDL.window.x11.window", 0);
+    if (xwindow) {
         ...
     }
 #endif