#include <FGrpRectangle.h>
#include <FMediaImageTypes.h>
#include <FSysSystemTime.h>
+#include <FUiAnimDisplayContext.h>
#include <FUiAnimVisualElementAnimation.h>
#include <FUiAnimVisualElementAnimationGroup.h>
#include <FUiAnimVisualElementPropertyAnimation.h>
if (__pixmap != pixmap )
{
_VisualElement* pVisualElement = GetVisualElement();
-// _VisualElement* pVisualElement = __pAppWidgetView->GetVisualElement();
SysTryReturnVoidResult(NID_SHELL, pVisualElement, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
_EflNode* pEflNode = dynamic_cast<_EflNode*>(pVisualElement->GetNativeNode());
__pPixmapObject.reset(evas_object_image_filled_add(pEvas));
SysTryReturnVoidResult(NID_SHELL, __pPixmapObject.get(), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
- pEflNode->AddNativeSmartObject(*pVisualElement, __pPixmapObject.get());
+ _Window* pWindow = GetRootWindow();
+ SysTryReturnVoidResult(NID_SHELL, pWindow, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+
+ DisplayContext* pDisplayContext = pWindow->GetDisplayContext();
+ SysTryReturnVoidResult(NID_SHELL, pDisplayContext, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+
+ __pVisualElementSurface.reset(_VisualElementSurfaceImpl::CreateSurfaceUsingExistingObjectN(*pDisplayContext, (Handle)__pPixmapObject.get(), Dimension(width, height)));
+ SysTryReturnVoidResult(NID_SHELL, __pVisualElementSurface, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+
+ unique_ptr<VisualElement, _VisualElementDeleter> pPixmapVisualElement(new (std::nothrow) VisualElement);
+ SysTryReturnVoidResult(NID_SHELL, pPixmapVisualElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+
+ result r = pPixmapVisualElement->Construct();
+ SysTryReturnVoidResult(NID_SHELL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pPixmapVisualElement = move(pPixmapVisualElement);
+ __pPixmapVisualElement->SetImplicitAnimationEnabled(false);
+
+ pVisualElement->AttachChild(__pPixmapVisualElement.get());
+
+ __pPixmapVisualElement->SetBounds(FloatRectangle(0.0f, 0.0f, width, height));
+ __pPixmapVisualElement->SetSurface(__pVisualElementSurface.get());
+ __pPixmapVisualElement->SetShowState(true);
evas_object_image_size_set(__pPixmapObject.get(), width, height);
evas_object_image_colorspace_set(__pPixmapObject.get(), EVAS_COLORSPACE_ARGB8888);
evas_object_image_alpha_set(__pPixmapObject.get(), EINA_TRUE);
- evas_object_raise(__pPixmapObject.get());
evas_object_move(__pPixmapObject.get(), 0, 0);
evas_object_show(__pPixmapObject.get());
}
};
std::unique_ptr<Ecore_Event_Handler, _EcoreEventHandlerDeleter> __pPixmapEventHandler;
+
+ struct _VisualElementDeleter
+ {
+ void operator()(Tizen::Ui::Animations::VisualElement* pVisualElement)
+ {
+ if (pVisualElement)
+ {
+ pVisualElement->Destroy();
+ }
+ }
+ };
+ std::unique_ptr<Tizen::Ui::Animations::VisualElement, _VisualElementDeleter> __pPixmapVisualElement;
+ std::unique_ptr<Tizen::Ui::Animations::VisualElementSurface> __pVisualElementSurface;
}; // _AppWidgetPopupView
}} // Tizen::Shell
void
_AppWidgetPopupViewPresenter::Draw(void)
{
-/*
- if (__pAppWidgetPopupView->GetPixmapId() != -1)
- {
- return;
- }
-*/
Bitmap* pBitmap = __pAppWidgetPopupView->GetBitmap();
SysTryReturnVoidResult(NID_SHELL, pBitmap, E_SYSTEM, "Bitmap is invalid.");
#include <FGrpDimension.h>
#include <FGrpPoint.h>
#include <FGrpRectangle.h>
+#include <FUiAnimDisplayContext.h>
#include <FUiAnimVisualElementPropertyAnimation.h>
#include <FBase_StringConverter.h>
#include <FGrp_BitmapImpl.h>
__pPixmapObject.reset(evas_object_image_filled_add(pEvas));
SysTryReturnVoidResult(NID_SHELL, __pPixmapObject, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
- pEflNode->AddNativeSmartObject(*pVisualElement, __pPixmapObject.get());
+ _Window* pWindow = GetRootWindow();
+ SysTryReturnVoidResult(NID_SHELL, pWindow, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+
+ DisplayContext* pDisplayContext = pWindow->GetDisplayContext();
+ SysTryReturnVoidResult(NID_SHELL, pDisplayContext, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+
+ __pVisualElementSurface.reset(_VisualElementSurfaceImpl::CreateSurfaceUsingExistingObjectN(*pDisplayContext, (Handle)__pPixmapObject.get(), Dimension(width, height)));
+ SysTryReturnVoidResult(NID_SHELL, __pVisualElementSurface, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+
+ unique_ptr<VisualElement, _VisualElementDeleter> pPixmapVisualElement(new (std::nothrow) VisualElement);
+ SysTryReturnVoidResult(NID_SHELL, pPixmapVisualElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+
+ result r = pPixmapVisualElement->Construct();
+ SysTryReturnVoidResult(NID_SHELL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pPixmapVisualElement = move(pPixmapVisualElement);
+ __pPixmapVisualElement->SetImplicitAnimationEnabled(false);
+
+ pVisualElement->AttachChild(__pPixmapVisualElement.get());
+
+ __pPixmapVisualElement->SetBounds(FloatRectangle(0.0f, 0.0f, width, height));
+ __pPixmapVisualElement->SetSurface(__pVisualElementSurface.get());
+ __pPixmapVisualElement->SetShowState(true);
evas_object_image_size_set(__pPixmapObject.get(), width, height);
evas_object_image_colorspace_set(__pPixmapObject.get(), EVAS_COLORSPACE_ARGB8888);
evas_object_image_alpha_set(__pPixmapObject.get(), EINA_TRUE);
- evas_object_raise(__pPixmapObject.get());
FloatRectangle absoluteBounds = GetAbsoluteBoundsF();
};
std::unique_ptr<Ecore_Event_Handler, _EcoreEventHandlerDeleter> __pPixmapEventHandler;
std::unique_ptr<Tizen::Base::Collection::IListT<_IAppWidgetViewEventListener*> > __pAppWidgetViewEventListenerList;
+
+ struct _VisualElementDeleter
+ {
+ void operator()(Tizen::Ui::Animations::VisualElement* pVisualElement)
+ {
+ if (pVisualElement)
+ {
+ pVisualElement->Destroy();
+ }
+ }
+ };
+ std::unique_ptr<Tizen::Ui::Animations::VisualElement, _VisualElementDeleter> __pPixmapVisualElement;
+ std::unique_ptr<Tizen::Ui::Animations::VisualElementSurface> __pVisualElementSurface;
}; // _AppWidgetView
}} // Tizen::Shell
void
_AppWidgetViewPresenter::Draw(void)
{
-/*
- if (__pAppWidgetView->GetPixmapId() != -1)
- {
- return;
- }
-*/
Bitmap* pBitmap = __pAppWidgetView->GetBitmap();
bool imageDone = false;