diff --git a/src/Magnum/Platform/GlfwApplication.h b/src/Magnum/Platform/GlfwApplication.h index 63faec92a..4a6b2bcb9 100644 --- a/src/Magnum/Platform/GlfwApplication.h +++ b/src/Magnum/Platform/GlfwApplication.h @@ -423,17 +423,6 @@ class GlfwApplication { void redraw() { _flags |= Flag::Redraw; } private: - /** - * @brief Exit event - * - * If implemented, it allows the application to react to an application - * exit (for example to save its internal state) and suppress it as - * well (for example to show a exit confirmation dialog). The default - * implementation calls @ref ExitEvent::setAccepted() on @p event, - * which tells the application that it's safe to exit. - */ - virtual void exitEvent(ExitEvent& event); - /** * @brief Viewport event * @@ -548,6 +537,21 @@ class GlfwApplication { /*@}*/ + /** @{ @name Special events */ + + /** + * @brief Exit event + * + * If implemented, it allows the application to react to an application + * exit (for example to save its internal state) and suppress it as + * well (for example to show a exit confirmation dialog). The default + * implementation calls @ref ExitEvent::setAccepted() on @p event, + * which tells the application that it's safe to exit. + */ + virtual void exitEvent(ExitEvent& event); + + /*@}*/ + private: enum class Flag: UnsignedByte { Redraw = 1 << 0, diff --git a/src/Magnum/Platform/Sdl2Application.h b/src/Magnum/Platform/Sdl2Application.h index 2b75549a6..9ec185888 100644 --- a/src/Magnum/Platform/Sdl2Application.h +++ b/src/Magnum/Platform/Sdl2Application.h @@ -734,32 +734,6 @@ class Sdl2Application { void redraw() { _flags |= Flag::Redraw; } private: - /** - * @brief Exit event - * - * If implemented, it allows the application to react to an application - * exit (for example to save its internal state) and suppress it as - * well (for example to show a exit confirmation dialog). The default - * implementation calls @ref ExitEvent::setAccepted() on @p event, - * which tells the application that it's safe to exit. - * - * SDL has special behavior on POSIX systems regarding `SIGINT` and - * `SIGTERM` handling, see @ref Platform-Sdl2Application-usage-posix - * for more information. - */ - virtual void exitEvent(ExitEvent& event); - - /** - * @brief Tick event - * - * If implemented, this function is called periodically after - * processing all input events and before draw event even though there - * might be no input events and redraw is not requested. Useful e.g. - * for asynchronous task polling. Use @ref setMinimalLoopPeriod()/ - * @ref setSwapInterval() to control main loop frequency. - */ - virtual void tickEvent(); - /** * @brief Viewport event * @@ -947,6 +921,36 @@ class Sdl2Application { /*@}*/ + /** @{ @name Special events */ + + /** + * @brief Exit event + * + * If implemented, it allows the application to react to an application + * exit (for example to save its internal state) and suppress it as + * well (for example to show a exit confirmation dialog). The default + * implementation calls @ref ExitEvent::setAccepted() on @p event, + * which tells the application that it's safe to exit. + * + * SDL has special behavior on POSIX systems regarding `SIGINT` and + * `SIGTERM` handling, see @ref Platform-Sdl2Application-usage-posix + * for more information. + */ + virtual void exitEvent(ExitEvent& event); + + /** + * @brief Tick event + * + * If implemented, this function is called periodically after + * processing all input events and before draw event even though there + * might be no input events and redraw is not requested. Useful e.g. + * for asynchronous task polling. Use @ref setMinimalLoopPeriod()/ + * @ref setSwapInterval() to control main loop frequency. + */ + virtual void tickEvent(); + + /*@}*/ + private: enum class Flag: UnsignedByte { Redraw = 1 << 0,