From 91be097e80006a89f254a3e0ff06ce50a3b3ba2e Mon Sep 17 00:00:00 2001 From: Tobias Frisch <tfrisch@uni-koblenz.de> Date: Mon, 25 Apr 2022 16:42:39 +0200 Subject: [PATCH] Adjusted doxygen comments of window Signed-off-by: Tobias Frisch <tfrisch@uni-koblenz.de> --- include/vkcv/Window.hpp | 80 +++++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 38 deletions(-) diff --git a/include/vkcv/Window.hpp b/include/vkcv/Window.hpp index 66ba1dcd..b807f819 100644 --- a/include/vkcv/Window.hpp +++ b/include/vkcv/Window.hpp @@ -33,12 +33,13 @@ namespace vkcv { public: /** - * creates an uninitialized #Window + * @brief Constructor of an uninitialized #Window */ Window(); /** - * creates a #Window with the parameters + * @brief Constructor of a #Window with an optional width, + * height and resizable attribute. * * @param[in] title title of the window * @param[in] width width of the window (optional) @@ -48,14 +49,14 @@ namespace vkcv { explicit Window(const char* title, int width = -1, int height = -1, bool resizable = false); /** - * Copy-constructor of #Window + * @brief Copy-constructor of a #Window * * @param other Other instance of #Window */ Window(const Window& other) = delete; /** - * Copy-operator of #Window + * @brief Copy-operator of a #Window * * @param other Other instance of #Window * @return Reference to itself @@ -63,40 +64,41 @@ namespace vkcv { Window &operator=(const Window &other) = delete; /** - * checks if the window is still open, or the close event was called - * This function should be changed/removed later on - * @return bool if the window is still open + * @brief Checks if the window is still open, or the close event was called. + * TODO: This function should be changed/removed later on + * + * @return True, if the window is still open, else false */ [[nodiscard]] bool isOpen() const; /** - * gets the currently focused window and returns it - * only accessible to WindowManager - * @return + * @brief Gets the currently focused window and returns it + * TODO: only accessible to WindowManager + * + * @return Current window in focus */ static Window& getFocusedWindow(); /** - * checks if any GLFWWindows are open - * @return bool if a window is open + * @brief Checks if any GLFWWindows are open + * + * @return True, if any window is open, else false */ static bool hasOpenWindow(); /** - * polls all events on the GLFWwindow + * @brief Polls all events on the GLFWwindow */ static void pollEvents(); /** + * @brief Returns the required extensions to use GLFW windows with Vulkan. * - * @return + * @return Required surface extensions */ static const std::vector<std::string>& getExtensions(); - - /** - * basic events of the window - */ + event< int, int, int> e_mouseButton; event< double, double > e_mouseMove; event< double, double > e_mouseScroll; @@ -106,36 +108,41 @@ namespace vkcv { event< int > e_gamepad; /** - * returns the current window - * @return window handle + * @brief Returns the GLFW window handle. + * + * @return GLFW window handle */ [[nodiscard]] GLFWwindow *getWindow() const; /** - * gets the window title - * @return string with window title + * @brief Returns the title of the window. + * + * @return Window title */ [[nodiscard]] const std::string& getTitle() const; /** - * gets the window width - * @return int with window width + * @brief Returns the width of the window. + * + * @return Window width */ [[nodiscard]] int getWidth() const; /** - * gets the window height - * @return int with window height + * @brief Returns the height of the window. + * + * @return Window height */ [[nodiscard]] int getHeight() const; /** - * is the window resizable - * @return bool with window resizable + * @brief Returns whether the window is resizable or not. + * + * @return True, if the window is resizable, else false */ [[nodiscard]] bool isResizable() const; @@ -146,20 +153,17 @@ namespace vkcv { virtual ~Window(); /** - * destroys the window - */ - //void destroyWindow(); - - /** - * gets the windows framebuffer size - * @param width - * @param height + * Requests the windows framebuffer size + * + * @param[out] width + * @param[out] height */ void getFramebufferSize(int& width, int& height) const; /** - * gets the SwapchainHandle corresponding to the swapchain of the window - * @return + * @brief Retruns the andle of the swapchain in use by the window. + * + * @return Swapchain handle */ SwapchainHandle getSwapchainHandle() const; }; -- GitLab