result
AnimationTransaction::Begin(void)
{
- int transactionId = _AnimationManager::GetInstance()->BeginTransaction();
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return E_SUCCESS;
+ }
+
+ int transactionId = pAnimationManager->BeginTransaction();
SysTryReturnResult(NID_UI_ANIM, (transactionId != -1), E_OUT_OF_MEMORY, "Propagating.");
return E_SUCCESS;
result
AnimationTransaction::Begin(int& transactionId)
{
- transactionId = _AnimationManager::GetInstance()->BeginTransaction();
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return E_SUCCESS;
+ }
+
+ transactionId = pAnimationManager->BeginTransaction();
SysTryReturnResult(NID_UI_ANIM, (transactionId != -1), E_OUT_OF_MEMORY, "Propagating.");
return E_SUCCESS;
result
AnimationTransaction::Commit(void)
{
- result r = _AnimationManager::GetInstance()->CommitTransaction();
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return E_SUCCESS;
+ }
+
+ result r = pAnimationManager->CommitTransaction();
SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating.");
return r;
{
SysTryReturnResult(NID_UI_ANIM, (transactionId > 0), E_INVALID_ARG, "Invalid argument(s) is used. transactionId = %d", transactionId);
- result r = _AnimationManager::GetInstance()->StopTransaction(transactionId);
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return E_SUCCESS;
+ }
+
+ result r = pAnimationManager->StopTransaction(transactionId);
SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating.");
return r;
result
AnimationTransaction::Discard(void)
{
- result r = _AnimationManager::GetInstance()->DiscardTransaction();
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return E_SUCCESS;
+ }
+
+ result r = pAnimationManager->DiscardTransaction();
SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating.");
return r;
{
SysTryReturn(NID_UI_ANIM, (transactionId > 0), ANIMATION_TRANSACTION_STATUS_STOPPED, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. transactionId = %d.", transactionId);
- if (_AnimationManager::GetInstance()->IsTransactionRunning(transactionId))
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+
+ if (pAnimationManager && pAnimationManager->IsTransactionRunning(transactionId))
{
return ANIMATION_TRANSACTION_STATUS_PLAYING;
}
result
AnimationTransaction::SetTransactionEventListener(IAnimationTransactionEventListener* pListener)
{
- _AnimationManager::GetInstance()->SetTransactionEventListener(pListener);
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (pAnimationManager)
+ {
+ pAnimationManager->_AnimationManager::GetInstance()->SetTransactionEventListener(pListener);
+ }
return E_SUCCESS;
}
result
AnimationTransaction::SetCurrentTransactionEventListener(IAnimationTransactionEventListener* pListener)
{
- _TransactionNode* pNode = _AnimationManager::GetInstance()->GetCurrentTransaction();
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return E_SUCCESS;
+ }
+
+ _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction();
SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened.");
result r = pNode->SetEventListener(pListener);
result
AnimationTransaction::SetVisualElementImplicitAnimationEnabled(bool enable)
{
- _TransactionNode* pNode = _AnimationManager::GetInstance()->GetCurrentTransaction();
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return E_SUCCESS;
+ }
+
+ _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction();
SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened.");
result r = pNode->SetImplicitAnimationEnabled(enable);
result
AnimationTransaction::SetVisualElementAnimationStatusEventListener(IVisualElementAnimationStatusEventListener* pListener)
{
- _TransactionNode* pNode = _AnimationManager::GetInstance()->GetCurrentTransaction();
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return E_SUCCESS;
+ }
+
+ _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction();
SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened.");
pNode->SetStatusEventListener(pListener);
result
AnimationTransaction::SetVisualElementAnimationTimingFunction(const IVisualElementAnimationTimingFunction* pTimingFunction)
{
- _TransactionNode* pNode = _AnimationManager::GetInstance()->GetCurrentTransaction();
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return E_SUCCESS;
+ }
+
+ _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction();
SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened.");
pNode->SetTimingFunction(pTimingFunction);
result
AnimationTransaction::SetVisualElementAnimationValueInterpolator(const IVisualElementAnimationValueInterpolator* pValueInterpolator)
{
- _TransactionNode* pNode = _AnimationManager::GetInstance()->GetCurrentTransaction();
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return E_SUCCESS;
+ }
+
+ _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction();
SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened.");
pNode->SetValueInterpolator(pValueInterpolator);
result
AnimationTransaction::SetVisualElementAnimationDuration(long milliseconds)
{
- _TransactionNode* pNode = _AnimationManager::GetInstance()->GetCurrentTransaction();
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return E_SUCCESS;
+ }
+
+ _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction();
SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened.");
SysTryReturnResult(NID_UI_ANIM, (milliseconds >= 0 && milliseconds >= pNode->GetOffset()),
E_INVALID_ARG, "Invalid argument(s) is used. milliseconds = %ld", milliseconds);
long
AnimationTransaction::GetVisualElementAnimationDuration(void)
{
- _TransactionNode* pNode = _AnimationManager::GetInstance()->GetCurrentTransaction();
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return E_SUCCESS;
+ }
+
+ _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction();
SysTryReturn(NID_UI_ANIM, (pNode != null), -1, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Transaction isn't opened.");
return pNode->GetDuration();
result
AnimationTransaction::SetVisualElementAnimationOffset(long milliseconds)
{
- _TransactionNode* pNode = _AnimationManager::GetInstance()->GetCurrentTransaction();
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return E_SUCCESS;
+ }
+
+ _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction();
SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened.");
SysTryReturnResult(NID_UI_ANIM, (milliseconds >= 0 && milliseconds <= pNode->GetDuration()),
E_INVALID_ARG, "Invalid argument(s) is used. milliseconds = %ld", milliseconds);
long
AnimationTransaction::GetVisualElementAnimationOffset(void)
{
- _TransactionNode* pNode = _AnimationManager::GetInstance()->GetCurrentTransaction();
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return -1;
+ }
+
+ _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction();
SysTryReturn(NID_UI_ANIM, (pNode != null), -1, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Transaction isn't opened.");
return pNode->GetOffset();
{
SysTryReturnResult(NID_UI_ANIM, (milliseconds >= 0), E_INVALID_ARG, "Invalid argument(s) is used. milliseconds = %ld", milliseconds);
- _TransactionNode* pNode = _AnimationManager::GetInstance()->GetCurrentTransaction();
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return E_SUCCESS;
+ }
+
+ _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction();
SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened.");
pNode->SetDelay(milliseconds);
long
AnimationTransaction::GetVisualElementAnimationDelay(void)
{
- _TransactionNode* pNode = _AnimationManager::GetInstance()->GetCurrentTransaction();
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return -1;
+ }
+
+ _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction();
SysTryReturn(NID_UI_ANIM, (pNode != null), -1, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Transaction isn't opened.");
return pNode->GetDelay();
{
SysTryReturnResult(NID_UI_ANIM, (count >= 0), E_INVALID_ARG, "Invalid argument(s) is used. count = %ld", count);
- _TransactionNode* pNode = _AnimationManager::GetInstance()->GetCurrentTransaction();
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return E_SUCCESS;
+ }
+
+ _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction();
SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened.");
pNode->SetRepeatCount(count);
long
AnimationTransaction::GetVisualElementAnimationRepeatCount(void)
{
- _TransactionNode* pNode = _AnimationManager::GetInstance()->GetCurrentTransaction();
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return -1;
+ }
+
+ _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction();
SysTryReturn(NID_UI_ANIM, (pNode != null), -1, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Transaction isn't opened.");
return pNode->GetRepeatCount();
result
AnimationTransaction::SetVisualElementAnimationAutoReverseEnabled(bool autoReverse)
{
- _TransactionNode* pNode = _AnimationManager::GetInstance()->GetCurrentTransaction();
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return E_SUCCESS;
+ }
+
+ _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction();
SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened.");
pNode->SetAutoReverseEnabled(autoReverse);
bool
AnimationTransaction::IsVisualElementAnimationAutoReverseEnabled(void)
{
- _TransactionNode* pNode = _AnimationManager::GetInstance()->GetCurrentTransaction();
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return false;
+ }
+
+ _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction();
SysTryReturn(NID_UI_ANIM, (pNode != null), false, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Transaction isn't opened.");
bool autoReverse = pNode->IsAutoReverseEnabled();
{
SysTryReturnResult(NID_UI_ANIM, (scaleRatio > 0.f), E_INVALID_ARG, "Invalid argument(s) is used. scaleRatio = %f", scaleRatio);
- _TransactionNode* pNode = _AnimationManager::GetInstance()->GetCurrentTransaction();
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return E_SUCCESS;
+ }
+
+ _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction();
SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened.");
pNode->SetScaleRatio(scaleRatio);
float
AnimationTransaction::GetVisualElementAnimationScaleRatio(void)
{
- _TransactionNode* pNode = _AnimationManager::GetInstance()->GetCurrentTransaction();
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return 0.0f;
+ }
+
+ _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction();
SysTryReturn(NID_UI_ANIM, (pNode != null), 0.0f, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Transaction isn't opened.");
return pNode->GetScaleRatio();
#include "FUiAnim_RootVisualElement.h"
#include "FUiAnim_ControlVisualElement.h"
#include "FUiAnim_MatrixUtil.h"
-#include "FUiAnim_Debug.h"
#include "FUiAnim_EflNode.h"
#include "FUiAnim_EflLayer.h"
#include "FUiAnim_VisualElementSurfaceImpl.h"
}
else
{
- _AnimationManager* pManager = _AnimationManager::GetInstance();
- if (pManager)
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (pAnimationManager)
{
- pManager->RemoveAllAnimations(*__pPublicInstance);
+ pAnimationManager->RemoveAllAnimations(*__pPublicInstance);
}
__pModel = null;
result
_VisualElementImpl::FlushI(void)
{
+ _DisplayManager* pDisplayManager = _DisplayManager::GetInstance();
#ifdef VE_VSYNC_UPDATE
- _DisplayManager::GetInstance()->RenderAll();
+ if (pDisplayManager)
+ {
+ pDisplayManager->RenderAll();
+ }
#endif
- return _DisplayManager::GetInstance()->Flush();
+ result r = E_SUCCESS;
+ if (pDisplayManager)
+ {
+ r = pDisplayManager->Flush();
+ }
+ return r;
}
bool
bool r = true;
_AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return r;
+ }
if (likely(GetRoot())
&& likely(GetSharedData().needSurface)
const String& property = *pVePropShowState;
_AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (pAnimationManager)
+ {
if (likely(GetRoot()) && (unlikely(pAnimationManager->IsImplicitAnimationEnabled() && __isImplicitAnimationEnabled)))
{
// WARNING:
__pPresentation->SetShowStateProperty(SHOWOPACITY_VISIBLE(__showOpacity));
}
InvokeOnShowStateChanged(oldShowState);
-
+ }
}
return E_SUCCESS;
}
// Setting implicit animation to the child.
- if (!IS_PRESENTATION(this) && _AnimationManager::GetInstance()->IsImplicitAnimationEnabled() && child.__isImplicitAnimationEnabled)
+ if (!IS_PRESENTATION(this) && _AnimationManager::GetInstance()
+ && _AnimationManager::GetInstance()->IsImplicitAnimationEnabled() && child.__isImplicitAnimationEnabled)
{
child.RemoveAnimation(*pVePropActionAttach);
return E_OBJ_NOT_FOUND;
}
- if (!IS_PRESENTATION(this) && (_AnimationManager::GetInstance()->IsImplicitAnimationEnabled()
+ if (!IS_PRESENTATION(this) && (_AnimationManager::GetInstance() && _AnimationManager::GetInstance()->IsImplicitAnimationEnabled()
&& child.__isImplicitAnimationEnabled) && child.IsAncestorDestroying() == false)
{
r = CreateElementTreeForDetachImplicitAnimation(child);
// Use presentation tree for animation
VisualElement* pPresentation = __pPresentation->__pPublicInstance;
- r = _AnimationManager::GetInstance()->AddAnimation(*pPresentation, pKeyName, *pCloned);
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ SysLog(NID_UI_ANIM, "Failed to add animation.");
+
+ delete pCloned;
+ return E_SUCCESS;
+ }
+
+ r = pAnimationManager->AddAnimation(*pPresentation, pKeyName, *pCloned);
if (r != E_SUCCESS)
{
SysTryLog(NID_UI_ANIM, "[%s] Failed to add animation.", GetErrorMessage(r));
{
_AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+ if (!pAnimationManager)
+ {
+ return E_SUCCESS;
+ }
+
// Get presentation tree
VisualElement* pPresentation = __pPresentation->__pPublicInstance;
_VisualElementImpl::RemoveAnimation(const Tizen::Base::String& keyName)
{
VisualElement* pPresentation = __pPresentation->__pPublicInstance;
+ result r = E_SUCCESS;
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
- return _AnimationManager::GetInstance()->RemoveAnimation(*pPresentation, keyName);
+ if (pAnimationManager)
+ {
+ r = pAnimationManager->RemoveAnimation(*pPresentation, keyName);
+ }
+ return r;
}
result
_VisualElementImpl::RemoveAllAnimations(void)
{
VisualElement* pPresentation = __pPresentation->__pPublicInstance;
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
- _AnimationManager::GetInstance()->RemoveAllAnimations(*pPresentation);
-
+ if (pAnimationManager)
+ {
+ pAnimationManager->RemoveAllAnimations(*pPresentation);
+ }
return E_SUCCESS;
}
ClearLastResult();
- return _AnimationManager::GetInstance()->GetAnimationN(*pPresentation, keyName);
+ _AnimationManager* pAnimationManager = _AnimationManager::GetInstance();
+
+ if (pAnimationManager)
+ {
+ return pAnimationManager->GetAnimationN(*pPresentation, keyName);
+ }
+ return null;
}
bool