namespace Tizen { namespace Shell
{
-const wchar_t* OPEN_ANIMATION = L"Open";
-const wchar_t* CLOSE_ANIMATION = L"Close";
+const wchar_t* OPEN_ANIMATION = L"PopupOpen";
+const wchar_t* CLOSE_ANIMATION = L"PopupClose";
_AppWidgetPopupView::_AppWidgetPopupView(_AppWidgetView& appwidgetView)
: __pAppWidgetPopupViewPresenter(new (std::nothrow) _AppWidgetPopupViewPresenter(*this))
VisualElementAnimationGroup animationGroup;
animationGroup.SetDuration(ANIMATION_DURATION);
- animationGroup.SetVisualElementAnimationStatusEventListener(this);
+// animationGroup.SetVisualElementAnimationStatusEventListener(this);
+ animationGroup.SetVisualElementAnimationStatusEventListener(__pAppWidgetView);
FloatRectangle bounds = GetBoundsF();
bounds.x = 0.0f;
}
void
-_AppWidgetPopupView::OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target)
-{
-}
-
-void
-_AppWidgetPopupView::OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally)
-{
- if (keyName == CLOSE_ANIMATION)
- {
- SysLog(NID_SHELL, "Close AppWidgetPopup");
- Close();
- FireAppWidgetPopupEvent(false);
- }
-}
-
-void
-_AppWidgetPopupView::OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount)
-{
-}
-
-void
_AppWidgetPopupView::OnDraw(void)
{
__pAppWidgetPopupViewPresenter->Draw();
#include <Evas.h>
#include <Ecore.h>
#include <Ecore_X.h>
-#include <FUiAnimIVisualElementAnimationStatusEventListener.h>
#include <FUiCtrl_IFrameEventListener.h>
#include <FUi_Window.h>
*/
class _AppWidgetPopupView
: public Tizen::Ui::_Window
- , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener
, public Tizen::Ui::Controls::_IFrameEventListener
{
public:
virtual bool OnTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchInfo);
virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchInfo);
virtual void OnBoundsChanged(void);
- virtual void OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target);
- virtual void OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally);
- virtual void OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount);
virtual void OnDraw(void);
virtual result OnAttachedToMainTree(void);
virtual result OnDetachingFromMainTree(void);
const int ANIMATION_DURATION = 200;
const wchar_t* CLICK_ANIMATION = L"Click";
const wchar_t* FLICK_ANIMATION = L"Flick";
+const wchar_t* POPUP_OPEN_ANIMATION = L"PopupOpen";
+const wchar_t* POPUP_CLOSE_ANIMATION = L"PopupClose";
_AppWidgetView::_AppWidgetView(void)
: __pAppWidgetViewPresenter(new (std::nothrow) _AppWidgetViewPresenter(*this))
animation.SetEndValue(Variant(endBounds));
animation.SetDuration(ANIMATION_DURATION);
animation.SetAutoReverseEnabled(true);
- animation.SetVisualElementAnimationStatusEventListener(this);
pVisualElement->AddAnimation(FLICK_ANIMATION, animation);
}
void
_AppWidgetView::OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally)
{
+ if (keyName == POPUP_CLOSE_ANIMATION)
+ {
+ SysLog(NID_SHELL, "Close AppWidgetPopup");
+ __pAppWidgetPopupView->Close();
+ __pAppWidgetPopupView.reset(null);
+// FireAppWidgetPopupEvent(false);
+ }
}
void