Dali 3D User Interface Engine
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions
Dali::Timer Class Reference

Mechanism to issue simple periodic or one-shot events. More...

#include <timer.h>

Inheritance diagram for Dali::Timer:
Inheritance graph
[legend]
Collaboration diagram for Dali::Timer:
Collaboration graph
[legend]

Public Types

typedef Signal< bool() > TimerSignalType
 Timer finished signal callback type .0. More...
 
typedef Signal< bool() > TimerSignalType
 
- Public Types inherited from Dali::BaseHandle
typedef void(BaseHandle::* BooleanType )() const
 Pointer-to-member type. More...
 

Public Member Functions

 Timer ()
 Constructor, creates an uninitialized timer. More...
 
 Timer (const Timer &timer)
 Copy constructor. More...
 
Timeroperator= (const Timer &timer)
 Assignment operator. More...
 
 ~Timer ()
 Destructor. More...
 
void Start ()
 Start timer. More...
 
void Stop ()
 Stop timer. More...
 
void SetInterval (unsigned int milliSec)
 Sets a new interval on the timer and starts the timer. More...
 
unsigned int GetInterval () const
 Get the interval of timer. More...
 
bool IsRunning () const
 Tells whether timer is running. More...
 
TimerSignalTypeTickSignal ()
 Signal emitted after specified time interval. More...
 
DALI_INTERNAL Timer (Internal::Adaptor::Timer *timer)
 
void MockEmitSignal ()
 
 Timer ()
 
 Timer (const Timer &timer)
 
Timeroperator= (const Timer &timer)
 
 ~Timer ()
 
void Start ()
 
void Stop ()
 
void SetInterval (unsigned int milliSec)
 
unsigned int GetInterval () const
 
bool IsRunning () const
 
TimerSignalTypeTickSignal ()
 
- Public Member Functions inherited from Dali::BaseHandle
 BaseHandle (Dali::BaseObject *handle)
 This constructor is used by Dali New() methods. More...
 
 BaseHandle ()
 This constructor provides an uninitialized Dali::BaseHandle. More...
 
 ~BaseHandle ()
 Dali::BaseHandle is intended as a base class. More...
 
 BaseHandle (const BaseHandle &handle)
 This copy constructor is required for (smart) pointer semantics. More...
 
BaseHandleoperator= (const BaseHandle &rhs)
 This assignment operator is required for (smart) pointer semantics. More...
 
template<class T >
bool ConnectSignal (ConnectionTrackerInterface *connectionTracker, const std::string &signalName, const T &functor)
 Connects a void() functor to a specified signal. More...
 
bool DoAction (const std::string &actionName, const Property::Map &attributes)
 Perform action on this object with the given action name and attributes. More...
 
const std::string & GetTypeName () const
 Returns the type name for the Handle. More...
 
bool GetTypeInfo (Dali::TypeInfo &info) const
 Returns the type info for the Handle. More...
 
BaseObjectGetBaseObject ()
 Retrieve the internal Dali resource. More...
 
const BaseObjectGetBaseObject () const
 Retrieve the internal Dali resource. More...
 
void Reset ()
 Resets the handle. More...
 
 operator BooleanType () const
 Converts an handle to a BooleanType. More...
 
bool operator== (const BaseHandle &rhs) const
 Equality operator overload. More...
 
bool operator!= (const BaseHandle &rhs) const
 Inequality operator overload. More...
 
Dali::RefObjectGetObjectPtr () const
 Get the reference counted object pointer. More...
 

Static Public Member Functions

static Timer New (unsigned int milliSec)
 Create an tick Timer that emits periodic signal. More...
 
static Timer DownCast (BaseHandle handle)
 Downcast an Object handle to Timer handle. More...
 
static Timer New (unsigned int milliSec)
 
static Timer DownCast (BaseHandle handle)
 

Private Member Functions

 Timer (Internal::Adaptor::Timer *timer)
 

Additional Inherited Members

- Protected Member Functions inherited from Dali::BaseHandle
void ThisIsSaferThanReturningVoidStar () const
 Used by the safe bool idiom. More...
 

Detailed Description

Mechanism to issue simple periodic or one-shot events.

Timer is provided for application developers to be able to issue simple periodic or one-shot events. Please note that timer callback functions should return as soon as possible, because they block the next SignalTick. Please note that timer signals are not in sync with Dali's render timer.

This class is a handle class so it can be stack allocated and used as a member. .0

Definition at line 54 of file timer.h.

Member Typedef Documentation

Definition at line 46 of file toolkit-timer.h.

Timer finished signal callback type .0.

Definition at line 58 of file timer.h.

Constructor & Destructor Documentation

Dali::Timer::Timer ( )

Constructor, creates an uninitialized timer.

Call New to fully construct a timer. .0

Definition at line 30 of file timer.cpp.

Referenced by DownCast(), and New().

Here is the caller graph for this function:

Dali::Timer::Timer ( const Timer timer)

Copy constructor.

.0

Parameters
[in]timerThe handle to copy. The copied handle will point at the same implementation

Definition at line 40 of file timer.cpp.

Dali::Timer::~Timer ( )

Destructor.

This is non-virtual since derived Handle types must not contain data or virtual methods. .0

Definition at line 55 of file timer.cpp.

Dali::Timer::Timer ( Internal::Adaptor::Timer timer)
explicit

Definition at line 94 of file timer.cpp.

Dali::Timer::Timer ( )
Dali::Timer::Timer ( const Timer timer)
Dali::Timer::~Timer ( )
Dali::Timer::Timer ( Internal::Adaptor::Timer timer)
private

Member Function Documentation

static Timer Dali::Timer::DownCast ( BaseHandle  handle)
static
Timer Dali::Timer::DownCast ( BaseHandle  handle)
static

Downcast an Object handle to Timer handle.

If handle points to a Timer object the downcast produces a valid handle. If not the returned handle is left uninitialized.

.0

Parameters
[in]handleto An object
Returns
handle to a Timer object or an uninitialized handle

Definition at line 59 of file timer.cpp.

References Dali::BaseHandle::GetObjectPtr(), and Timer().

Referenced by UtcDaliTimerDownCastN(), and UtcDaliTimerDownCastP().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int Dali::Timer::GetInterval ( ) const
unsigned int Dali::Timer::GetInterval ( ) const

Get the interval of timer.

Returns
Interval in milliseconds. .0

Definition at line 79 of file timer.cpp.

References Dali::Internal::Adaptor::GetImplementation().

Referenced by UtcDaliTimerAssignmentOperator(), UtcDaliTimerCopyConstructor(), UtcDaliTimerCreation(), UtcDaliTimerSetInterval(), and UtcDaliTimerUnitializedGetInterval().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Timer::IsRunning ( ) const
bool Dali::Timer::IsRunning ( ) const

Tells whether timer is running.

.0

Returns
Whether Timer is started or not.

Definition at line 84 of file timer.cpp.

References Dali::Internal::Adaptor::GetImplementation().

Referenced by Dali::Toolkit::Text::Decorator::Impl::DoPan(), Dali::Toolkit::Internal::ItemView::OnWheelEvent(), Dali::Toolkit::Text::Decorator::StartCursorBlink(), Dali::Toolkit::Text::Decorator::Impl::StartScrollTimer(), UtcDaliTimerIsRunning(), and UtcDaliTimerUnitializedIsRunning().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Timer::MockEmitSignal ( )

Definition at line 223 of file toolkit-timer.cpp.

References Dali::Internal::Adaptor::GetImplementation().

Referenced by UtcDaliPopupPropertyAutoHide(), and UtcDaliPopupTypeToast().

Here is the call graph for this function:

Here is the caller graph for this function:

static Timer Dali::Timer::New ( unsigned int  milliSec)
static
Timer Dali::Timer::New ( unsigned int  milliSec)
static
Timer& Dali::Timer::operator= ( const Timer timer)
Timer & Dali::Timer::operator= ( const Timer timer)

Assignment operator.

.0

Parameters
[in]timerThe handle to copy. This handle will point at the same implementation as the copied handle.
Returns
Reference to this timer handle

Definition at line 45 of file timer.cpp.

References Dali::BaseHandle::operator=().

Here is the call graph for this function:

void Dali::Timer::SetInterval ( unsigned int  milliSec)
void Dali::Timer::SetInterval ( unsigned int  milliSec)

Sets a new interval on the timer and starts the timer.

Cancels the previous timer. .0

Parameters
milliSecInterval in milliseconds.

Definition at line 74 of file timer.cpp.

References Dali::Internal::Adaptor::GetImplementation().

Referenced by Dali::Toolkit::Internal::Slider::DisplayPopup(), Dali::Internal::Adaptor::LongPressGestureDetector::SendEvent(), Dali::Internal::Adaptor::SingleThreadController::SetRenderRefreshRate(), UtcDaliTimerSetInterval(), and UtcDaliTimerUnitializedSetInterval().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Timer::Start ( )
void Dali::Timer::Start ( )
void Dali::Timer::Stop ( )
void Dali::Timer::Stop ( )
TimerSignalType& Dali::Timer::TickSignal ( )
Timer::TimerSignalType & Dali::Timer::TickSignal ( )

The documentation for this class was generated from the following files:
Dali Docs Home
Read more about Dali