Add doxygen comments

This commit is contained in:
Rob Loach
2023-06-22 12:13:26 -04:00
parent b722cfa8bf
commit 3677be2b33

View File

@@ -25,6 +25,14 @@ class Window {
/**
* Initialize window and OpenGL context.
*
* @param width The width of the window.
* @param height The height of the window.
* @param title The desired title of the window.
* @param flags The ConfigFlags to set prior to initializing the window. See SetConfigFlags for more details.
*
* @see ::SetConfigFlags()
* @see ConfigFlags
*
* @throws raylib::RaylibException Thrown if the window failed to initiate.
*/
Window(int width, int height, const std::string& title = "raylib", unsigned int flags = 0) {
@@ -41,11 +49,19 @@ class Window {
/**
* Initializes the window.
*
* @param width The width of the window.
* @param height The height of the window.
* @param title The desired title of the window.
* @param flags The ConfigFlags to set prior to initializing the window. See SetConfigFlags for more details.
*
* @see ::SetConfigFlags()
* @see ConfigFlags
*
* @throws raylib::RaylibException Thrown if the window failed to initiate.
*/
inline void Init(int width = 800, int height = 450, const std::string& title = "raylib", unsigned int flags = 0) {
if (flags != 0) {
SetConfigFlags(flags);
::SetConfigFlags(flags);
}
::InitWindow(width, height, title.c_str());
if (!::IsWindowReady()) {
@@ -405,6 +421,13 @@ class Window {
return ::IsWindowReady();
}
/**
* Sets the configuration flags for raylib.
*
* @param flags The ConfigFlags to apply to the configuration.
*
* @see ::SetConfigFlags
*/
inline void SetConfigFlags(unsigned int flags) {
::SetConfigFlags(flags);
}