From b29d6ee4627d7dd707372249030df370d210292f Mon Sep 17 00:00:00 2001 From: SabeDoesThings <122580233+SabeDoesThings@users.noreply.github.com> Date: Mon, 9 Feb 2026 05:51:43 -0600 Subject: [PATCH 1/2] Update BINDINGS.md (#5538) --- BINDINGS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BINDINGS.md b/BINDINGS.md index 6ef57035f..e39602e4b 100644 --- a/BINDINGS.md +++ b/BINDINGS.md @@ -78,7 +78,6 @@ Some people ported raylib to other languages in the form of bindings or wrappers | [raylib-rs](https://github.com/raylib-rs/raylib-rs) | **5.5** | [Rust](https://www.rust-lang.org) | Zlib | | [raylib-ruby](https://github.com/wilsonsilva/raylib-ruby) | 4.5 | [Ruby](https://www.ruby-lang.org) | Zlib | | [Relib](https://github.com/RedCubeDev-ByteSpace/Relib) | 3.5 | [ReCT](https://github.com/RedCubeDev-ByteSpace/ReCT) | **???** | -| [ringraylib5](https://github.com/ring-lang/ring/tree/master/extensions/ringraylib5) | **5.0** | [Ring](https://ring-lang.github.io/) | **???** | | [racket-raylib](https://github.com/eutro/racket-raylib) | **5.5** | [Racket](https://racket-lang.org) | MIT/Apache-2.0 | | [raylib-swift](https://github.com/STREGAsGate/Raylib) | 4.0 | [Swift](https://swift.org) | MIT | | [raylib-scopes](https://github.com/salotz/raylib-scopes) | auto | [Scopes](http://scopes.rocks) | MIT | @@ -95,6 +94,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers | [raylib-sunder](https://github.com/ashn-dot-dev/raylib-sunder) | **auto** | [Sunder](https://github.com/ashn-dot-dev/sunder) | 0BSD | | [raylib-bqn](https://github.com/Brian-ED/raylib-bqn) | **5.0** | [BQN](https://mlochbaum.github.io/BQN) | MIT | | [rayjs](https://github.com/mode777/rayjs) | 4.6-dev | [QuickJS](https://bellard.org/quickjs) | MIT | +| [rayjule](https://github.com/SabeDoesThings/rayjule) | **5.5** | [Jule](https://jule.dev/) | MIT | | [raylib-raku](https://github.com/vushu/raylib-raku) | **auto** | [Raku](https://www.raku.org) | Artistic License 2.0 | | [Raylib.lean](https://github.com/KislyjKisel/Raylib.lean) | **5.5-dev** | [Lean4](https://lean-lang.org) | BSD-3-Clause | | [raylib-cobol](https://codeberg.org/glowiak/raylib-cobol) | **auto** | [COBOL](https://gnucobol.sourceforge.io) | Public domain | From 5a36ce5e7c2e7b278901c022caeb427b8635f9a4 Mon Sep 17 00:00:00 2001 From: mikeemm <42421968+mikeemm@users.noreply.github.com> Date: Mon, 9 Feb 2026 13:00:18 +0100 Subject: [PATCH 2/2] [rcore] Implemented SetWindowMaxSize, SetWindowMinSize, and SetWindowSize (#5536) * implemented SetWindowMaxSize, SetWindowMinSize and SetWindowSize * removed outdated warning * prevented incompatible size limits --- src/platforms/rcore_desktop_win32.c | 61 +++++++++++++++++++---------- 1 file changed, 40 insertions(+), 21 deletions(-) diff --git a/src/platforms/rcore_desktop_win32.c b/src/platforms/rcore_desktop_win32.c index fd10fca04..17d4fc530 100644 --- a/src/platforms/rcore_desktop_win32.c +++ b/src/platforms/rcore_desktop_win32.c @@ -156,8 +156,6 @@ static PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB = NULL; // Flags that have no operations to perform during an update #define FLAG_MASK_NO_UPDATE (FLAG_WINDOW_HIGHDPI | FLAG_MSAA_4X_HINT) -#define WM_APP_UPDATE_WINDOW_SIZE (WM_APP + 1) - #define WGL_DRAW_TO_WINDOW_ARB 0x2001 #define WGL_ACCELERATION_ARB 0x2003 #define WGL_SUPPORT_OPENGL_ARB 0x2010 @@ -426,9 +424,7 @@ static bool UpdateWindowSize(int mode, HWND hwnd, int width, int height, unsigne else swpFlags |= SWP_NOMOVE; // WARNING: This code must be called after swInit() has been called, after InitPlatform() in [rcore] - //RECT rc = {0, 0, desired.cx, desired.cy}; - //AdjustWindowRectEx(&rc, WS_OVERLAPPEDWINDOW, FALSE, 0); - //SetWindowPos(hwnd, NULL, windowPos.x, windowPos.y, rc.right - rc.left, rc.bottom - rc.top, SWP_NOMOVE | SWP_NOZORDER); + SetWindowPos(hwnd, NULL, windowPos.x, windowPos.y, windowSize.cx, windowSize.cy, SWP_NOMOVE | SWP_NOZORDER); return true; } @@ -976,25 +972,40 @@ void SetWindowMonitor(int monitor) // Set window minimum dimensions (FLAG_WINDOW_RESIZABLE) void SetWindowMinSize(int width, int height) { - TRACELOG(LOG_WARNING, "SetWindowMinSize not implemented"); + if ((width > CORE.Window.screenMax.width) || (height > CORE.Window.screenMax.height)) + { + TRACELOG(LOG_WARNING, "WIN32: WINDOW: Cannot set minimum screen size higher than the maximum"); + return; + } CORE.Window.screenMin.width = width; CORE.Window.screenMin.height = height; + + SetWindowSize(platform.appScreenWidth, platform.appScreenHeight); } // Set window maximum dimensions (FLAG_WINDOW_RESIZABLE) void SetWindowMaxSize(int width, int height) { - TRACELOG(LOG_WARNING, "SetWindowMaxSize not implemented"); + if ((width < CORE.Window.screenMin.width) || (height < CORE.Window.screenMin.height)) + { + TRACELOG(LOG_WARNING, "WIN32: WINDOW: Cannot set maximum screen size lower than the minimum"); + return; + } CORE.Window.screenMax.width = width; CORE.Window.screenMax.height = height; + + SetWindowSize(platform.appScreenWidth, platform.appScreenHeight); } // Set window dimensions void SetWindowSize(int width, int height) { - TRACELOG(LOG_WARNING, "SetWindowSize not implemented"); + int screenWidth = fmaxf(CORE.Window.screenMin.width, fminf(CORE.Window.screenMax.width, width)); + int screenHeight = fmaxf(CORE.Window.screenMin.height, fminf(CORE.Window.screenMax.height, height)); + + UpdateWindowSize(1, platform.hwnd, screenWidth, screenHeight, platform.desiredFlags); } // Set window opacity, value opacity is between 0.0 and 1.0 @@ -1494,7 +1505,8 @@ int InitPlatform(void) // NOTE: From this point CORE.Window.flags should always reflect the actual state of the window CORE.Window.flags = FLAG_WINDOW_HIDDEN | (platform.desiredFlags & FLAG_MASK_NO_UPDATE); - + CORE.Window.screenMax.width = 9999; + CORE.Window.screenMax.height = 9999; /* // TODO: Review SetProcessDpiAwarenessContext() // NOTE: SetProcessDpiAwarenessContext() requires Windows 10, version 1703 and shcore.lib linkage @@ -1747,14 +1759,27 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpara } break; case WM_SIZING: { - if (CORE.Window.flags & FLAG_WINDOW_RESIZABLE) - { - // TODO: Enforce min/max size - } - else TRACELOG(LOG_WARNING, "WIN32: WINDOW: Trying to resize a non-resizable window"); + if (!(CORE.Window.flags & FLAG_WINDOW_RESIZABLE)) + TRACELOG(LOG_WARNING, "WIN32: WINDOW: Trying to resize a non-resizable window"); result = TRUE; } break; + case WM_GETMINMAXINFO: + { + DWORD style = MakeWindowStyle(platform.desiredFlags); + SIZE maxClientSize = { CORE.Window.screenMax.width, CORE.Window.screenMax.height }; + SIZE maxWindowSize = CalcWindowSize(96, maxClientSize, style); + SIZE minClientSize = { CORE.Window.screenMin.width, CORE.Window.screenMin.height }; + SIZE minWindowSize = CalcWindowSize(96, minClientSize, style); + + LPMINMAXINFO lpmmi = (LPMINMAXINFO) lparam; + lpmmi->ptMaxSize.x = maxWindowSize.cx; + lpmmi->ptMaxSize.y = maxWindowSize.cy; + lpmmi->ptMaxTrackSize.x = maxWindowSize.cx; + lpmmi->ptMaxTrackSize.y = maxWindowSize.cy; + lpmmi->ptMinTrackSize.x = minWindowSize.cx; + lpmmi->ptMinTrackSize.y = minWindowSize.cy; + } break; case WM_STYLECHANGING: { if (wparam == GWL_STYLE) @@ -1960,10 +1985,6 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpara } break; case WM_MOUSEWHEEL: CORE.Input.Mouse.currentWheelMove.y = ((float)GET_WHEEL_DELTA_WPARAM(wparam))/WHEEL_DELTA; break; case WM_MOUSEHWHEEL: CORE.Input.Mouse.currentWheelMove.x = ((float)GET_WHEEL_DELTA_WPARAM(wparam))/WHEEL_DELTA; break; - case WM_APP_UPDATE_WINDOW_SIZE: - { - //UpdateWindowSize(UPDATE_WINDOW_NORMAL, hwnd, platform.appScreenWidth, platform.appScreenHeight, CORE.Window.flags); - } break; default: result = DefWindowProcW(hwnd, msg, wparam, lparam); // Message passed directly for execution (default behaviour) } @@ -2045,12 +2066,10 @@ static void HandleWindowResize(HWND hwnd, int *width, int *height) GetClientRect(hwnd, &rect); SIZE clientSize = { rect.right, rect.bottom }; - // TODO: Update framebuffer on resize CORE.Window.currentFbo.width = (int)clientSize.cx; CORE.Window.currentFbo.height = (int)clientSize.cy; - //SetupViewport(0, 0, clientSize.cx, clientSize.cy); - SetupViewport(clientSize.cx, clientSize.cy); + CORE.Window.resizedLastFrame = true; float dpiScale = ((float)GetDpiForWindow(hwnd))/96.0f; bool highdpi = !!(CORE.Window.flags & FLAG_WINDOW_HIGHDPI);