-#ifndef __DALI_TIMER_H__
-#define __DALI_TIMER_H__
+#ifndef DALI_TIMER_H
+#define DALI_TIMER_H
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <dali/public-api/object/base-handle.h>
#include <dali/public-api/signals/dali-signal.h>
+// INTERNAL INCLUDES
+#include <dali/public-api/dali-adaptor-common.h>
+
namespace Dali
{
/**
{
class Timer;
}
-}
+} // namespace DALI_INTERNAL
/**
* @brief Mechanism to issue simple periodic or one-shot events.
* as a member.
* @SINCE_1_0.0
*/
-class DALI_IMPORT_API Timer : public BaseHandle
+class DALI_ADAPTOR_API Timer : public BaseHandle
{
-public: // Signal typedefs
-
- typedef Signal< bool () > TimerSignalType; ///< Timer finished signal callback type @SINCE_1_0.0
+public: // Signal typedefs
+ typedef Signal<bool()> TimerSignalType; ///< Timer finished signal callback type @SINCE_1_0.0
public: // API
-
/**
* @brief Constructor, creates an uninitialized timer.
*
* @param[in] milliSec Interval in milliseconds
* @return A new timer
*/
- static Timer New( unsigned int milliSec );
+ static Timer New(unsigned int milliSec);
/**
* @brief Copy constructor.
* @SINCE_1_0.0
* @param[in] timer The handle to copy. The copied handle will point at the same implementation
*/
- Timer( const Timer& timer );
+ Timer(const Timer& timer);
/**
* @brief Assignment operator.
* as the copied handle
* @return Reference to this timer handle
*/
- Timer& operator=( const Timer& timer );
+ Timer& operator=(const Timer& timer);
+
+ /**
+ * @brief Move constructor.
+ *
+ * @SINCE_1_9.24
+ * @param[in] rhs A reference to the moved handle
+ */
+ Timer(Timer&& rhs);
+
+ /**
+ * @brief Move assignment operator.
+ *
+ * @SINCE_1_9.24
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this handle
+ */
+ Timer& operator=(Timer&& rhs);
/**
* @brief Destructor.
* @param[in] handle to An object
* @return handle to a Timer object or an uninitialized handle
*/
- static Timer DownCast( BaseHandle handle );
+ static Timer DownCast(BaseHandle handle);
/**
* @brief Starts timer.
void Stop();
/**
+ * @brief Pauses timer.
+ * @SINCE_1_3.41
+ */
+ void Pause();
+
+ /**
+ * @brief Resumes timer.
+ * @SINCE_1_3.41
+ */
+ void Resume();
+
+ /**
* @brief Sets a new interval on the timer and starts the timer.
*
* Cancels the previous timer.
* @SINCE_1_0.0
* @param[in] milliSec Interval in milliseconds
*/
- void SetInterval( unsigned int milliSec );
+ void SetInterval(unsigned int milliSec);
+
+ /**
+ * @brief Sets a new interval on the timer with option to restart the timer.
+ *
+ * Cancels the previous timer.
+ * @SINCE_1_3.41
+ * @param[in] milliSec Interval in milliseconds
+ * @param[in] restart Flag to set enabled to restart or not.
+ */
+ void SetInterval(unsigned int milliSec, bool restart);
/**
* @brief Gets the interval of timer.
bool IsRunning() const;
public: // Signals
-
/**
* @brief Signal emitted after specified time interval.
*
*/
} // namespace Dali
-#endif // __DALI_TIMER_H__
+#endif // DALI_TIMER_H