Browse Source

Platform: why this is here and not here.

pull/300/head
Vladimír Vondruš 7 years ago
parent
commit
e7671c0170
  1. 56
      src/Magnum/Platform/EmscriptenApplication.h

56
src/Magnum/Platform/EmscriptenApplication.h

@ -227,34 +227,6 @@ class EmscriptenApplication {
class KeyEvent; class KeyEvent;
class TextInputEvent; class TextInputEvent;
/**
* @brief Execute main loop
*
* Calls @ref mainLoopIteration() in a loop until @ref exit() is
* called. See @ref MAGNUM_EMSCRIPTENAPPLICATION_MAIN() for usage
* information.
*/
void exec();
/**
* @brief Exit application main loop
* @param exitCode Exit code for compatibility with other application
* implementations
*
* Stops main loop started by @ref exec().
*/
void exit(int exitCode = 0);
/**
* @brief Run one iteration of application main loop
*
* Called internally from @ref exec(). If you want to have better
* control over how the main loop behaves, you can call this function
* yourself from your own `main()` function instead of it being called
* automatically from @ref exec() / @ref MAGNUM_EMSCRIPTENAPPLICATION_MAIN().
*/
void mainLoopIteration();
#ifdef MAGNUM_TARGET_GL #ifdef MAGNUM_TARGET_GL
/** /**
* @brief Construct with given configuration for WebGL context * @brief Construct with given configuration for WebGL context
@ -319,6 +291,34 @@ class EmscriptenApplication {
/** @brief Moving is not allowed */ /** @brief Moving is not allowed */
EmscriptenApplication& operator=(EmscriptenApplication&&) = delete; EmscriptenApplication& operator=(EmscriptenApplication&&) = delete;
/**
* @brief Execute main loop
*
* Calls @ref mainLoopIteration() in a loop until @ref exit() is
* called. See @ref MAGNUM_EMSCRIPTENAPPLICATION_MAIN() for usage
* information.
*/
void exec();
/**
* @brief Exit application main loop
* @param exitCode Exit code for compatibility with other application
* implementations
*
* Stops main loop started by @ref exec().
*/
void exit(int exitCode = 0);
/**
* @brief Run one iteration of application main loop
*
* Called internally from @ref exec(). If you want to have better
* control over how the main loop behaves, you can call this function
* yourself from your own `main()` function instead of it being called
* automatically from @ref exec() / @ref MAGNUM_EMSCRIPTENAPPLICATION_MAIN().
*/
void mainLoopIteration();
protected: protected:
/* Nobody will need to have (and delete) EmscriptenApplication*, thus /* Nobody will need to have (and delete) EmscriptenApplication*, thus
this is faster than public pure virtual destructor */ this is faster than public pure virtual destructor */

Loading…
Cancel
Save