Skip to content
Snippets Groups Projects
Verified Commit 91be097e authored by Tobias Frisch's avatar Tobias Frisch
Browse files

Adjusted doxygen comments of window

parent 3fdb48d2
No related branches found
No related tags found
1 merge request!97Resolve "Dokumentation vervollständigen"
...@@ -33,12 +33,13 @@ namespace vkcv { ...@@ -33,12 +33,13 @@ namespace vkcv {
public: public:
/** /**
* creates an uninitialized #Window * @brief Constructor of an uninitialized #Window
*/ */
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] title title of the window
* @param[in] width width of the window (optional) * @param[in] width width of the window (optional)
...@@ -48,14 +49,14 @@ namespace vkcv { ...@@ -48,14 +49,14 @@ namespace vkcv {
explicit Window(const char* title, int width = -1, int height = -1, bool resizable = false); 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 * @param other Other instance of #Window
*/ */
Window(const Window& other) = delete; Window(const Window& other) = delete;
/** /**
* Copy-operator of #Window * @brief Copy-operator of a #Window
* *
* @param other Other instance of #Window * @param other Other instance of #Window
* @return Reference to itself * @return Reference to itself
...@@ -63,40 +64,41 @@ namespace vkcv { ...@@ -63,40 +64,41 @@ namespace vkcv {
Window &operator=(const Window &other) = delete; Window &operator=(const Window &other) = delete;
/** /**
* checks if the window is still open, or the close event was called * @brief Checks if the window is still open, or the close event was called.
* This function should be changed/removed later on * TODO: This function should be changed/removed later on
* @return bool if the window is still open *
* @return True, if the window is still open, else false
*/ */
[[nodiscard]] [[nodiscard]]
bool isOpen() const; bool isOpen() const;
/** /**
* gets the currently focused window and returns it * @brief Gets the currently focused window and returns it
* only accessible to WindowManager * TODO: only accessible to WindowManager
* @return *
* @return Current window in focus
*/ */
static Window& getFocusedWindow(); static Window& getFocusedWindow();
/** /**
* checks if any GLFWWindows are open * @brief Checks if any GLFWWindows are open
* @return bool if a window is open *
* @return True, if any window is open, else false
*/ */
static bool hasOpenWindow(); static bool hasOpenWindow();
/** /**
* polls all events on the GLFWwindow * @brief Polls all events on the GLFWwindow
*/ */
static void pollEvents(); 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(); static const std::vector<std::string>& getExtensions();
/**
* basic events of the window
*/
event< int, int, int> e_mouseButton; event< int, int, int> e_mouseButton;
event< double, double > e_mouseMove; event< double, double > e_mouseMove;
event< double, double > e_mouseScroll; event< double, double > e_mouseScroll;
...@@ -106,36 +108,41 @@ namespace vkcv { ...@@ -106,36 +108,41 @@ namespace vkcv {
event< int > e_gamepad; event< int > e_gamepad;
/** /**
* returns the current window * @brief Returns the GLFW window handle.
* @return window handle *
* @return GLFW window handle
*/ */
[[nodiscard]] [[nodiscard]]
GLFWwindow *getWindow() const; GLFWwindow *getWindow() const;
/** /**
* gets the window title * @brief Returns the title of the window.
* @return string with window title *
* @return Window title
*/ */
[[nodiscard]] [[nodiscard]]
const std::string& getTitle() const; const std::string& getTitle() const;
/** /**
* gets the window width * @brief Returns the width of the window.
* @return int with window width *
* @return Window width
*/ */
[[nodiscard]] [[nodiscard]]
int getWidth() const; int getWidth() const;
/** /**
* gets the window height * @brief Returns the height of the window.
* @return int with window height *
* @return Window height
*/ */
[[nodiscard]] [[nodiscard]]
int getHeight() const; int getHeight() const;
/** /**
* is the window resizable * @brief Returns whether the window is resizable or not.
* @return bool with window resizable *
* @return True, if the window is resizable, else false
*/ */
[[nodiscard]] [[nodiscard]]
bool isResizable() const; bool isResizable() const;
...@@ -146,20 +153,17 @@ namespace vkcv { ...@@ -146,20 +153,17 @@ namespace vkcv {
virtual ~Window(); virtual ~Window();
/** /**
* destroys the window * Requests the windows framebuffer size
*/ *
//void destroyWindow(); * @param[out] width
* @param[out] height
/**
* gets the windows framebuffer size
* @param width
* @param height
*/ */
void getFramebufferSize(int& width, int& height) const; void getFramebufferSize(int& width, int& height) const;
/** /**
* gets the SwapchainHandle corresponding to the swapchain of the window * @brief Retruns the andle of the swapchain in use by the window.
* @return *
* @return Swapchain handle
*/ */
SwapchainHandle getSwapchainHandle() const; SwapchainHandle getSwapchainHandle() const;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment