X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fadaptor%2Fcommon%2Fadaptor-impl.cpp;h=0a2708a8ad25a10bcf8f894b741e54a73b91e56f;hb=487dbc52b9fbe56f42abafc5ff5f09b54b79765f;hp=843b8ee38fb4a22ab69debecd8cf657b1f5b59f7;hpb=981d50a117e6830786e8e45708a3f2cd816c1693;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/adaptor/common/adaptor-impl.cpp b/dali/internal/adaptor/common/adaptor-impl.cpp index 843b8ee..0a2708a 100755 --- a/dali/internal/adaptor/common/adaptor-impl.cpp +++ b/dali/internal/adaptor/common/adaptor-impl.cpp @@ -19,7 +19,6 @@ #include // EXTERNAL INCLUDES -#include #include #include #include @@ -31,6 +30,7 @@ #include // INTERNAL INCLUDES +#include #include #include #include @@ -484,14 +484,14 @@ Dali::TtsPlayer Adaptor::GetTtsPlayer(Dali::TtsPlayer::Mode mode) return mTtsPlayers[mode]; } -bool Adaptor::AddIdle( CallbackBase* callback, bool forceAdd ) +bool Adaptor::AddIdle( CallbackBase* callback, bool hasReturnValue, bool forceAdd ) { bool idleAdded(false); // Only add an idle if the Adaptor is actually running if( RUNNING == mState || READY == mState || forceAdd ) { - idleAdded = mCallbackManager->AddIdleCallback( callback ); + idleAdded = mCallbackManager->AddIdleCallback( callback, hasReturnValue ); } return idleAdded; @@ -735,7 +735,7 @@ void Adaptor::RequestProcessEventsOnIdle( bool forceProcess ) // and we haven't installed the idle notification if( ( ! mNotificationOnIdleInstalled ) && ( RUNNING == mState || READY == mState || forceProcess ) ) { - mNotificationOnIdleInstalled = AddIdle( MakeCallback( this, &Adaptor::ProcessCoreEventsFromIdle ), forceProcess ); + mNotificationOnIdleInstalled = AddIdleEnterer( MakeCallback( this, &Adaptor::ProcessCoreEventsFromIdle ), forceProcess ); } } @@ -909,6 +909,24 @@ void Adaptor::SetRootLayoutDirection( std::string locale ) static_cast< LayoutDirection::Type >( Internal::Adaptor::Locale::GetDirection( std::string( locale ) ) ) ); } +bool Adaptor::AddIdleEnterer( CallbackBase* callback, bool forceAdd ) +{ + bool idleAdded( false ); + + // Only add an idle if the Adaptor is actually running + if( RUNNING == mState || READY == mState || forceAdd ) + { + idleAdded = mCallbackManager->AddIdleEntererCallback( callback ); + } + + return idleAdded; +} + +void Adaptor::RemoveIdleEnterer( CallbackBase* callback ) +{ + mCallbackManager->RemoveIdleEntererCallback( callback ); +} + } // namespace Adaptor } // namespace Internal