From cff060cd8a7e9cd7b0af6c51ed1c994191678607 Mon Sep 17 00:00:00 2001 From: Stuart Hayhurst Date: Thu, 28 Dec 2023 02:16:00 +0000 Subject: [PATCH] Allow disabling window resize --- src/ammonite/window.cpp | 8 ++++++++ src/ammonite/window.hpp | 3 +++ 2 files changed, 11 insertions(+) diff --git a/src/ammonite/window.cpp b/src/ammonite/window.cpp index efbb311..0776c87 100644 --- a/src/ammonite/window.cpp +++ b/src/ammonite/window.cpp @@ -280,6 +280,14 @@ namespace ammonite { *yPos = tempStorage.yPos; } + void setWindowResizable(bool resizable) { + glfwSetWindowAttrib(windowPtr, GLFW_RESIZABLE, resizable); + } + + bool getWindowResizable() { + return glfwGetWindowAttrib(windowPtr, GLFW_RESIZABLE); + } + bool getFullscreen() { return isFullscreen; } diff --git a/src/ammonite/window.hpp b/src/ammonite/window.hpp index ee2ebb1..6a1c000 100644 --- a/src/ammonite/window.hpp +++ b/src/ammonite/window.hpp @@ -23,6 +23,9 @@ namespace ammonite { void setWindowGeometry(int width, int height, int xPos, int yPos); void getWindowGeometry(int* width, int* height, int* xPos, int* yPos); + void setWindowResizable(bool resizable); + void getWindowResizable(); + bool getFullscreen(); GLFWmonitor* getFullscreenMonitor(); int getMonitors(GLFWmonitor*** monitorsPtr);