From fa0395bb9efd21c239c24aacfc7a711a45ebcf89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 13 Jan 2017 13:17:48 +0100 Subject: [PATCH] Platform: improve docs of MAGNUM_*APPLICATION_MAIN() for consistency. --- src/Magnum/Platform/Sdl2Application.h | 5 +++-- src/Magnum/Platform/WindowlessEglApplication.h | 13 ++++++++++--- src/Magnum/Platform/WindowlessIosApplication.h | 13 ++++++++++--- src/Magnum/Platform/WindowlessWglApplication.h | 13 ++++++++++--- .../Platform/WindowlessWindowsEglApplication.h | 15 +++++++++++---- 5 files changed, 44 insertions(+), 15 deletions(-) diff --git a/src/Magnum/Platform/Sdl2Application.h b/src/Magnum/Platform/Sdl2Application.h index 751c478e9..ef7e9924f 100644 --- a/src/Magnum/Platform/Sdl2Application.h +++ b/src/Magnum/Platform/Sdl2Application.h @@ -1601,8 +1601,9 @@ class Sdl2Application::TextEditingEvent { 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. +and is equivalent to the following on all supported platforms except +@ref CORRADE_TARGET_WINDOWS_RT "Windows RT", see @ref portability-applications +for more information. @code int main(int argc, char** argv) { className app({argc, argv}); diff --git a/src/Magnum/Platform/WindowlessEglApplication.h b/src/Magnum/Platform/WindowlessEglApplication.h index 1eeb03f25..d6e73af07 100644 --- a/src/Magnum/Platform/WindowlessEglApplication.h +++ b/src/Magnum/Platform/WindowlessEglApplication.h @@ -331,9 +331,16 @@ class WindowlessEglApplication { See @ref Magnum::Platform::WindowlessEglApplication "Platform::WindowlessEglApplication" for usage information. This macro abstracts out platform-specific entry point -code, see @ref portability-applications for more information. When no other -windowless application header is included this macro is also aliased to -`MAGNUM_WINDOWLESSAPPLICATION_MAIN()`. +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}); + return app.exec(); +} +@endcode +When no other windowless application header is included this macro is also +aliased to `MAGNUM_WINDOWLESSAPPLICATION_MAIN()`. */ #define MAGNUM_WINDOWLESSEGLAPPLICATION_MAIN(className) \ int main(int argc, char** argv) { \ diff --git a/src/Magnum/Platform/WindowlessIosApplication.h b/src/Magnum/Platform/WindowlessIosApplication.h index 292d06c77..169228ecd 100644 --- a/src/Magnum/Platform/WindowlessIosApplication.h +++ b/src/Magnum/Platform/WindowlessIosApplication.h @@ -289,9 +289,16 @@ class WindowlessIosApplication { See @ref Magnum::Platform::WindowlessIosApplication "Platform::WindowlessIosApplication" for usage information. This macro abstracts out platform-specific entry point -code, see @ref portability-applications for more information. When no other -windowless application header is included this macro is also aliased to -`MAGNUM_WINDOWLESSAPPLICATION_MAIN()`. +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}); + return app.exec(); +} +@endcode +When no other windowless application header is included this macro is also +aliased to `MAGNUM_WINDOWLESSAPPLICATION_MAIN()`. */ #define MAGNUM_WINDOWLESSIOSAPPLICATION_MAIN(className) \ int main(int argc, char** argv) { \ diff --git a/src/Magnum/Platform/WindowlessWglApplication.h b/src/Magnum/Platform/WindowlessWglApplication.h index e8170ab9d..88e031f73 100644 --- a/src/Magnum/Platform/WindowlessWglApplication.h +++ b/src/Magnum/Platform/WindowlessWglApplication.h @@ -343,9 +343,16 @@ class WindowlessWglApplication { See @ref Magnum::Platform::WindowlessWglApplication "Platform::WindowlessWglApplication" for usage information. This macro abstracts out platform-specific entry point -code, see @ref portability-applications for more information. When no other -windowless application header is included this macro is also aliased to -`MAGNUM_WINDOWLESSAPPLICATION_MAIN()`. +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}); + return app.exec(); +} +@endcode +When no other windowless application header is included this macro is also +aliased to `MAGNUM_WINDOWLESSAPPLICATION_MAIN()`. */ #define MAGNUM_WINDOWLESSWGLAPPLICATION_MAIN(className) \ int main(int argc, char** argv) { \ diff --git a/src/Magnum/Platform/WindowlessWindowsEglApplication.h b/src/Magnum/Platform/WindowlessWindowsEglApplication.h index 07a028458..9d41a6df8 100644 --- a/src/Magnum/Platform/WindowlessWindowsEglApplication.h +++ b/src/Magnum/Platform/WindowlessWindowsEglApplication.h @@ -327,10 +327,17 @@ class WindowlessWindowsEglApplication { @param className Class name See @ref Magnum::Platform::WindowlessWindowsEglApplication "Platform::WindowlessWindowsEglApplication" -for usage information. This macro abstracts out platform-specific entry point -code, see @ref portability-applications for more information. When no other -windowless application header is included this macro is also aliased to -`MAGNUM_WINDOWLESSAPPLICATION_MAIN()`. +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}); + return app.exec(); +} +@endcode +When no other windowless application header is included this macro is also +aliased to `MAGNUM_WINDOWLESSAPPLICATION_MAIN()`. */ #define MAGNUM_WINDOWLESSWINDOWSEGLAPPLICATION_MAIN(className) \ int main(int argc, char** argv) { \