X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fdevel-api%2Fadaptor-framework%2Foffscreen-application.h;h=3daa7359e609872b543e9e5d3c8293872f8a85f7;hb=5c5879c55783f80769ee5aaf0d9841a66ef8a0bd;hp=19588c845ab0d4e37adce68e60eaeca8db6cde51;hpb=f00e7017d4510c50ae325ee9052eb65f75b52be2;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/devel-api/adaptor-framework/offscreen-application.h b/dali/devel-api/adaptor-framework/offscreen-application.h index 19588c8..3daa735 100644 --- a/dali/devel-api/adaptor-framework/offscreen-application.h +++ b/dali/devel-api/adaptor-framework/offscreen-application.h @@ -18,17 +18,17 @@ * */ -/** - * @addtogroup dali_adaptor_framework - * @{ - */ - // EXTERNAL INCLUDES -#include #include +#include +#include namespace Dali { +/** + * @addtogroup dali_adaptor_framework + * @{ + */ class OffscreenWindow; @@ -39,102 +39,116 @@ class OffscreenApplication; /** * @brief Appliations can draw UI on offscreen surface with the OffscreenApplication. - * When you use a OffscreenApplication, you don't have to make a Window. + * When you use a OffscreenApplication, you don't have to create a Window. */ class DALI_IMPORT_API OffscreenApplication : public Dali::BaseHandle { public: + using OffscreenApplicationSignalType = Signal; - typedef Signal OffscreenApplicationSignalType; + /** + * @brief Enumeration for the render mode + */ + enum class RenderMode + { + AUTO, // Scene is rendered automatically + MANUAL // Scene is rendered by RenderOnce() + }; public: - /** * @brief This is the constructor of OffscreenApplication * * @param[in] width The initial width of the default OffscreenWindow * @param[in] height The initial height of the default OffscreenWindow * @param[in] isTranslucent Whether the OffscreenWindow is translucent or not + * @param[in] renderMode The RenderMode of the OffscreenApplication */ - static OffscreenApplication New( uint16_t width, uint16_t height, bool isTranslucent ); + static OffscreenApplication New(uint16_t width, uint16_t height, bool isTranslucent, RenderMode renderMode = RenderMode::AUTO); /** * @brief This is the constructor of OffscreenApplication * * @param[in] surface The native surface handle to create the OffscreenWindow - * @param[in] isTranslucent Whether the OffscreenWindow is translucent or not + * @param[in] renderMode The RenderMode of the OffscreenApplication */ - static OffscreenApplication New( Dali::Any surface, bool isTranslucent ); + static OffscreenApplication New(Dali::Any surface, RenderMode renderMode = RenderMode::AUTO); /** * @brief Constructs an empty handle */ - OffscreenApplication(); + OffscreenApplication(); /** * @brief Copy constructor + * + * @param [in] offscreenApplication A reference to the copied handle */ - OffscreenApplication( const OffscreenApplication& offscreenApplication ); + OffscreenApplication(const OffscreenApplication& offscreenApplication); /** * @brief Assignment operator + * + * @param [in] offscreenApplication A reference to the copied handle + * @return A reference to this */ - OffscreenApplication& operator=( const OffscreenApplication& offscreenApplication ); + OffscreenApplication& operator=(const OffscreenApplication& offscreenApplication); /** * @brief Destructor */ - ~OffscreenApplication(); + ~OffscreenApplication(); public: - /** - * @brief Runs the OffscreenApplication (rendering, event handling, etc) + * @brief Starts the OffscreenApplication (rendering, event handling, etc) */ - void Run(); + void Start(); /** * @brief Stops the OffscreenApplication */ void Stop(); - /** - * @brief Get the default Window handle - * @return The default Window + * @brief Get the default OffscreenWindow handle + * @return The default OffscreenWindow */ OffscreenWindow GetWindow(); -public: // Signals - /** + * @brief Renders once more even if we're paused + */ + void RenderOnce(); + +public: // Signals + /** * @brief Signal to notify the client when the application is ready to be initialized * - * @note OffscreenApplication::Run() should be called to be initialized + * @note OffscreenApplication::Start() should be called to be initialized * * @return The signal */ - OffscreenApplicationSignalType& InitSignal(); + OffscreenApplicationSignalType& InitSignal(); /** * @brief Signal to notify the user when the application is about to be terminated * * @return The signal */ - OffscreenApplicationSignalType& TerminateSignal(); + OffscreenApplicationSignalType& TerminateSignal(); public: // Not intended for application developers /** * @brief Internal constructor */ - explicit DALI_INTERNAL OffscreenApplication( Internal::OffscreenApplication* offscreenApplication ); - + explicit DALI_INTERNAL OffscreenApplication(Internal::OffscreenApplication* offscreenApplication); }; /** * @} */ -} // namespace Dali +} // namespace Dali #endif // DALI_OFFSCREEN_APPLICATION_H