From 68a672917340b0479a7313196ec77cb1231f024e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 27 Feb 2014 17:46:13 +0100 Subject: [PATCH] Platform: more documentation updates. --- src/Magnum/Platform/AbstractXApplication.h | 5 ++++- src/Magnum/Platform/GlutApplication.h | 14 ++++++++++---- src/Magnum/Platform/GlxApplication.h | 7 ++++--- src/Magnum/Platform/NaClApplication.h | 4 +++- src/Magnum/Platform/Sdl2Application.h | 11 +++++++---- src/Magnum/Platform/WindowlessGlxApplication.h | 11 +++++++---- src/Magnum/Platform/WindowlessNaClApplication.h | 16 +++++++++++++--- src/Magnum/Platform/XEglApplication.h | 7 ++++--- 8 files changed, 52 insertions(+), 23 deletions(-) diff --git a/src/Magnum/Platform/AbstractXApplication.h b/src/Magnum/Platform/AbstractXApplication.h index 41c265034..73f7c6faf 100644 --- a/src/Magnum/Platform/AbstractXApplication.h +++ b/src/Magnum/Platform/AbstractXApplication.h @@ -88,7 +88,10 @@ class AbstractXApplication { /** * @brief Execute main loop - * @return Value for returning from `main()`. + * @return Value for returning from `main()` + * + * See @ref MAGNUM_GLXAPPLICATION_MAIN() or + * @ref MAGNUM_XEGLAPPLICATION_MAIN() for usage information. */ int exec(); diff --git a/src/Magnum/Platform/GlutApplication.h b/src/Magnum/Platform/GlutApplication.h index 3721ef1fa..4947351da 100644 --- a/src/Magnum/Platform/GlutApplication.h +++ b/src/Magnum/Platform/GlutApplication.h @@ -132,7 +132,12 @@ class GlutApplication { /** @brief Moving is not allowed */ GlutApplication& operator=(GlutApplication&&) = delete; - /** @copydoc Sdl2Application::exec() */ + /** + * @brief Execute main loop + * @return Value for returning from `main()` + * + * See @ref MAGNUM_GLUTAPPLICATION_MAIN() for usage information. + */ int exec() { glutMainLoop(); return 0; @@ -560,9 +565,10 @@ class GlutApplication::MouseMoveEvent: public GlutApplication::InputEvent { @brief Entry point for GLUT-based applications @param className Class name -Can be with @ref Magnum::Platform::GlutApplication "Platform::GlutApplication" -subclasses used as equivalent to the following code to achieve better -portability, see @ref portability-applications for more information. +See @ref Magnum::Platform::GlutApplication "Platform::GlutApplication" for +usage information. This macro abstracts out platform-specific entry point code +and is equivalent to the following, see @ref portability-applications for more +information. @code int main(int argc, char** argv) { className app({argc, argv}); diff --git a/src/Magnum/Platform/GlxApplication.h b/src/Magnum/Platform/GlxApplication.h index b406817bc..8aead290a 100644 --- a/src/Magnum/Platform/GlxApplication.h +++ b/src/Magnum/Platform/GlxApplication.h @@ -92,9 +92,10 @@ class GlxApplication: public AbstractXApplication { @brief Entry point for GLX-based applications @param className Class name -Can be used with @ref Magnum::Platform::GlxApplication "Platform::GlxApplication" -subclasses as equivalent to the following code to achieve better portability, -see @ref portability-applications for more information. +See @ref Magnum::Platform::GlxApplication "Platform::GlxApplication" for usage +information. This macro abstracts out platform-specific entry point code and is +equivalent to the following, see @ref portability-applications for more +information. @code int main(int argc, char** argv) { className app({argc, argv}); diff --git a/src/Magnum/Platform/NaClApplication.h b/src/Magnum/Platform/NaClApplication.h index fb3552d69..d134c5560 100644 --- a/src/Magnum/Platform/NaClApplication.h +++ b/src/Magnum/Platform/NaClApplication.h @@ -750,7 +750,9 @@ namespace Implementation { @brief Entry point for NaCl application @param application Application class name -See @ref Magnum::Platform::NaClApplication "Platform::NaClApplication" and +See @ref Magnum::Platform::NaClApplication "Platform::NaClApplication" for +usage information. This macro abstracts out platform-specific entry point code +(the classic `main()` function cannot be used in NaCl). See @ref portability-applications for more information. When no other application header is included this macro is also aliased to `MAGNUM_APPLICATION_MAIN()`. */ diff --git a/src/Magnum/Platform/Sdl2Application.h b/src/Magnum/Platform/Sdl2Application.h index b2c712343..60009586b 100644 --- a/src/Magnum/Platform/Sdl2Application.h +++ b/src/Magnum/Platform/Sdl2Application.h @@ -232,7 +232,9 @@ class Sdl2Application { /** * @brief Execute main loop - * @return Value for returning from `main()`. + * @return Value for returning from `main()` + * + * See @ref MAGNUM_SDL2APPLICATION_MAIN() for usage information. */ int exec(); @@ -876,9 +878,10 @@ class Sdl2Application::MouseMoveEvent: public Sdl2Application::InputEvent { @brief Entry point for SDL2-based applications @param className Class name -Can be used with @ref Magnum::Platform::Sdl2Application "Platform::Sdl2Application" -subclasses as equivalent to the following code to achieve better portability, -see @ref portability-applications for more information. +See @ref Magnum::Platform::Sdl2Application "Platform::Sdl2Application" for +usage information. This macro abstracts out platform-specific entry point code +and is equivalent to the following, see @ref portability-applications for more +information. @code int main(int argc, char** argv) { className app({argc, argv}); diff --git a/src/Magnum/Platform/WindowlessGlxApplication.h b/src/Magnum/Platform/WindowlessGlxApplication.h index 11d90b556..024ce2fa7 100644 --- a/src/Magnum/Platform/WindowlessGlxApplication.h +++ b/src/Magnum/Platform/WindowlessGlxApplication.h @@ -130,7 +130,9 @@ class WindowlessGlxApplication { /** * @brief Execute application - * @return Value for returning from `main()`. + * @return Value for returning from `main()` + * + * See @ref MAGNUM_WINDOWLESSAPPLICATION_MAIN() for usage information. */ virtual int exec() = 0; @@ -174,9 +176,10 @@ class WindowlessGlxApplication::Configuration { @brief Entry point for windowless GLX application @param className Class name -Can be used with @ref Magnum::Platform::WindowlessGlxApplication "Platform::WindowlessGlxApplication" -subclasses as equivalent to the following code to achieve better portability, -see @ref portability-applications for more information. +See @ref Magnum::Platform::WindowlessGlxApplication "Platform::WindowlessGlxApplication" +for usage information. This macro abstracts out platform-specific entry point +code and is equivalent to the following, see @ref portability-applications for +more information. @code int main(int argc, char** argv) { className app({argc, argv}); diff --git a/src/Magnum/Platform/WindowlessNaClApplication.h b/src/Magnum/Platform/WindowlessNaClApplication.h index c9f181d4b..8b2320850 100644 --- a/src/Magnum/Platform/WindowlessNaClApplication.h +++ b/src/Magnum/Platform/WindowlessNaClApplication.h @@ -133,9 +133,17 @@ class WindowlessNaClApplication: public pp::Instance, public pp::Graphics3DClien /** @brief Moving is not allowed */ WindowlessNaClApplication& operator=(WindowlessNaClApplication&&) = delete; + #ifdef DOXYGEN_GENERATING_OUTPUT + protected: + #else + private: + #endif /** * @brief Execute application - * @return Value for returning from `main()`. + * @return Value for returning from `main()` + * + * This function is not meant to be called from user code, see + * @ref MAGNUM_WINDOWLESSNACLAPPLICATION_MAIN() for usage information. */ virtual int exec() = 0; @@ -199,8 +207,10 @@ namespace Implementation { @param application Application class name See @ref Magnum::Platform::WindowlessNaClApplication "Platform::WindowlessNaClApplication" -and @ref portability-applications for more information. When no other -windowless application header is included this macro is also aliased to +for usage information. This macro abstracts out platform-specific entry point +code (the classic `main()` function cannot be used in NaCl). See +@ref portability-applications for more information. When no other windowless +application header is included this macro is also aliased to `MAGNUM_WINDOWLESSAPPLICATION_MAIN()`. */ /* look at that insane placement of __attribute__. WTF. */ diff --git a/src/Magnum/Platform/XEglApplication.h b/src/Magnum/Platform/XEglApplication.h index 759487d49..067cd8476 100644 --- a/src/Magnum/Platform/XEglApplication.h +++ b/src/Magnum/Platform/XEglApplication.h @@ -92,9 +92,10 @@ class XEglApplication: public AbstractXApplication { @brief Entry point for X/EGL-based applications @param className Class name -Can be used with @ref Magnum::Platform::XEglApplication "Platform::XEglApplication" -subclasses as equivalent to the following code to achieve better portability, -see @ref portability-applications for more information. +See @ref Magnum::Platform::XEglApplication "Platform::XEglApplication" for +usage information. This macro abstracts out platform-specific entry point code +and is equivalent to the following, see @ref portability-applications for more +information. @code int main(int argc, char** argv) { className app({argc, argv});