*/
result Construct(const Tizen::Graphics::Dimension& size);
+ /*\r
+ * Initializes this instance of %LiveboxFrame with the specified parameter.\r
+ *\r
+ * @since 2.1\r
+ * @return An error code\r
+ * @param[in] size The new width and height\r
+ * @exception E_SUCCESS The method is successful.\r
+ * @exception E_INVALID_ARG A specified input parameter is invalid.\r
+ * @see LiveboxProvider::OnLiveboxProviderInitialize()\r
+ */\r
+ result ConstructF(const Tizen::Graphics::FloatDimension& size);
+
/**
* Initializes this instance of %LiveboxFrame with the specified parameter.
*
*/
result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Dimension& size);
+ /*\r
+ * Initializes this instance of %LiveboxFrame with the specified parameter.\r
+ *\r
+ * @since 2.1\r
+ * @return An error code\r
+ * @param[in] layout The layout for both the portrait and landscape mode\r
+ * @param[in] size The new width and height\r
+ * @exception E_SUCCESS The method is successful.\r
+ * @exception E_INVALID_ARG A specified input parameter is invalid.\r
+ * @see LiveboxProvider::OnLiveboxProviderInitialize()\r
+ */\r
+ result ConstructF(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatDimension& size);
+
protected:
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
*/
result Construct(const Tizen::Graphics::Dimension& size);
+ /*\r
+ * Initializes this instance of %LiveboxFrame with the specified parameter.\r
+ *\r
+ * @since 2.1\r
+ * @return An error code\r
+ * @param[in] size The new width and height\r
+ * @exception E_SUCCESS The method is successful.\r
+ * @exception E_INVALID_ARG A specified input parameter is invalid.\r
+ * @see LiveboxProvider::OnLiveboxPopupProviderInitialize()\r
+ */\r
+ result ConstructF(const Tizen::Graphics::FloatDimension& size);\r
+
/**
* Initializes this instance of %LiveboxFrame with the specified parameter.
*
*/
result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Dimension& size);
+ /*\r
+ * Initializes this instance of %LiveboxFrame with the specified parameter.\r
+ *\r
+ * @since 2.1\r
+ * @return An error code\r
+ * @param[in] layout The layout for both the portrait and landscape mode\r
+ * @param[in] size The new width and height\r
+ * @exception E_SUCCESS The method is successful.\r
+ * @exception E_INVALID_ARG A specified input parameter is invalid.\r
+ * @see LiveboxProvider::OnLiveboxPopupProviderInitialize()\r
+ */\r
+ result ConstructF(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatDimension& size);\r
+
+ /*\r
+ * Gets the bounds of the client area.\r
+ *\r
+ * @since 2.1\r
+ *\r
+ * @return The bounds of the client area in a Rectangle instance\r
+ */\r
+ Tizen::Graphics::Rectangle GetClientAreaBounds(void) const;\r
+\r
+ /*\r
+ * Gets the bounds of the client area.\r
+ *\r
+ * @since 2.1\r
+ *\r
+ * @return The bounds of the client area in a FloatRectangle instance\r
+ */\r
+ Tizen::Graphics::FloatRectangle GetClientAreaBoundsF(void) const;\r
+\r
+ /*\r
+ * Creates and returns a graphics canvas whose bounds (position and size) are equal to the bounds of the client area of the %LiveboxPopup.\r
+ *\r
+ * @since 2.1\r
+ *\r
+ * @return The graphic canvas of the %LiveboxPopup, @n\r
+ * else @c null if an error occurs\r
+ * @exception E_SUCCESS The method is successful.\r
+ * @exception E_RESOURCE_UNAVAILABLE The required resource is currently unavailable.\r
+ * @remarks The method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the client area of the % LiveboxPopup. @n\r
+ * It is the responsibility of the developers to deallocate the canvas after use.\r
+ * @remarks The canvas is valid only if the properties of the parent control of the canvas remain unchanged. @n\r
+ * Therefore, delete the previously allocated canvas and create a new canvas using the GetCanvasN() method if the size or position of the\r
+ * control is changed.\r
+ * @remarks The specific error code can be accessed using the GetLastResult() method.\r
+ */\r
+ Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const;\r
+\r
+ /*\r
+ * Translates the specified position to the client coordinates.\r
+ *\r
+ * @since 2.1\r
+ *\r
+ * @return The position in relative to the top-left corner of the client-area, @n\r
+ * else @c (-1,-1) if the instance is invalid\r
+ * @param[in] position The position relative to the top-left corner of the %LiveboxPopup.\r
+ * @see TranslateFromClientAreaPosition()\r
+ */\r
+ Tizen::Graphics::Point TranslateToClientAreaPosition(const Tizen::Graphics::Point& position) const;\r
+\r
+ /*\r
+ * Translates the specified position to the client coordinates.\r
+ *\r
+ * @since 2.1\r
+ *\r
+ * @return The float position in relative to the top-left corner of the client-area, @n\r
+ * else @c (-1.0f,-1.0f) if the instance is invalid\r
+ * @param[in] position The float position relative to the top-left corner of the %LiveboxPopup.\r
+ * @see TranslateFromClientAreaPositionF()\r
+ */\r
+ Tizen::Graphics::FloatPoint TranslateToClientAreaPositionF(const Tizen::Graphics::FloatPoint& position) const;\r
+\r
+ /*\r
+ * Translates the specified client position to the control coordinate.\r
+ *\r
+ * @since 2.1\r
+ *\r
+ * @return The position in relative to the top-left corner of the %Popup control, @n\r
+ * else @c (-1,-1) if the instance is invalid\r
+ * @param[in] clientPosition The position relative to the top-left corner of the client area\r
+ * @see TranslateToClientAreaPosition()\r
+ */\r
+ Tizen::Graphics::Point TranslateFromClientAreaPosition(const Tizen::Graphics::Point& clientPosition) const;\r
+\r
+ /*\r
+ * Translates the specified client position to the control coordinate.\r
+ *\r
+ * @since 2.1\r
+ *\r
+ * @return The float position in relative to the top-left corner of the %Popup control, @n\r
+ * else @c (-1.0f,-1.0f) if the instance is invalid\r
+ * @param[in] clientPosition The float position relative to the top-left corner of the client area\r
+ * @see TranslateToClientAreaPositionF()\r
+ */\r
+ Tizen::Graphics::FloatPoint TranslateFromClientAreaPositionF(const Tizen::Graphics::FloatPoint& clientPosition) const;
+
protected:
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
*/
result Construct(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::Rectangle& rect);
+ /*\r
+ * Initializes this instance of %LiveboxView with the specified parameter.\r
+ *\r
+ * @since 2.1\r
+ * @return An error code\r
+ * @param[in] appId The AppId of the installed application\r
+ * @param[in] providerName The name of the Livebox provider\r
+ * @param[in] rect An instance of the FloatRectangle class @n\r
+ * This instance represents the x and y coordinates of the top-left corner @n\r
+ * of the created window along with its width and height. @n\r
+ * @exception E_SUCCESS The method is successful.\r
+ * @exception E_INVALID_ARG A specified input parameter is invalid.\r
+ * @exception E_APP_NOT_INSTALLED The application is not installed.\r
+ * @exception E_OBJ_NOT_FOUND The specified Livebox provider is not found.\r
+ */\r
+ result ConstructF(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::FloatRectangle& rect);\r
+
/**
* Initializes this instance of %LiveboxView with the specified parameter.
*
*/
result Construct(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::Rectangle& rect, const Tizen::Base::String& userInfo);
+ /**\r
+ * Initializes this instance of %LiveboxView with the specified parameter.\r
+ *\r
+ * @since 2.1\r
+ * @return An error code\r
+ * @param[in] appId The AppId of the installed application\r
+ * @param[in] providerName The name of the Livebox provider\r
+ * @param[in] rect An instance of the FloatRectangle class @n\r
+ * This instance represents the x and y coordinates of the top-left corner @n\r
+ * of the created window along with its width and height. @n\r
+ * @param[in] userInfo Extra data to be delivered to Livebox provider\r
+ * @exception E_SUCCESS The method is successful.\r
+ * @exception E_INVALID_ARG A specified input parameter is invalid.\r
+ * @exception E_APP_NOT_INSTALLED The application is not installed.\r
+ * @exception E_OBJ_NOT_FOUND The specified Livebox provider is not found.\r
+ */\r
+ result ConstructF(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::FloatRectangle& rect, const Tizen::Base::String& userInfo);\r
+
protected:
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
result
LiveboxFrame::Construct(const Dimension& size)
{
+ return ConstructF(FloatDimension(static_cast<float>(size.width), static_cast<float>(size.height)));
+}
+
+result
+LiveboxFrame::ConstructF(const FloatDimension& size)
+{
SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
unique_ptr<_LiveboxFrameImpl> pImpl(_LiveboxFrameImpl::CreateLiveboxFrameImplN(*this, null, null));
result r = GetLastResult();
result
LiveboxFrame::Construct(const Layout& layout, const Dimension& size)
{
+ return ConstructF(layout, FloatDimension(static_cast<float>(size.width), static_cast<float>(size.height)));
+}
+
+result
+LiveboxFrame::ConstructF(const Layout& layout, const FloatDimension& size)
+{
SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
unique_ptr<_LiveboxFrameImpl> pImpl(_LiveboxFrameImpl::CreateLiveboxFrameImplN(*this, &layout, &layout));
result
LiveboxPopup::Construct(const Dimension& size)
{
+ return ConstructF(FloatDimension(static_cast<float>(size.width), static_cast<float>(size.height)));
+}
+
+result
+LiveboxPopup::ConstructF(const FloatDimension& size)
+{
SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
unique_ptr<_LiveboxPopupImpl> pImpl(_LiveboxPopupImpl::CreateLiveboxPopupImplN(*this, null, null));
result
LiveboxPopup::Construct(const Layout& layout, const Dimension& size)
{
+ return ConstructF(layout, FloatDimension(static_cast<float>(size.width), static_cast<float>(size.height)));
+}
+
+result
+LiveboxPopup::ConstructF(const Layout& layout, const FloatDimension& size)
+{
SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
unique_ptr<_LiveboxPopupImpl> pImpl(_LiveboxPopupImpl::CreateLiveboxPopupImplN(*this, &layout, &layout));
return r;
}
+Rectangle\r
+LiveboxPopup::GetClientAreaBounds(void) const\r
+{\r
+ FloatRectangle floatRect = GetClientAreaBoundsF();\r
+\r
+ return Rectangle(floatRect.x, floatRect.y, floatRect.width, floatRect.height);\r
+}\r
+\r
+FloatRectangle\r
+LiveboxPopup::GetClientAreaBoundsF(void) const\r
+{\r
+ const _LiveboxPopupImpl* pImpl = _LiveboxPopupImpl::GetInstance(*this);
+ SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");\r
+\r
+ return pImpl->GetClientAreaBounds();\r
+}\r
+\r
+Canvas*\r
+LiveboxPopup::GetClientAreaCanvasN(void) const\r
+{\r
+ const _LiveboxPopupImpl* pImpl = _LiveboxPopupImpl::GetInstance(*this);
+ SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");\r
+\r
+ Canvas* pCanvas = pImpl->GetClientAreaCanvasN();\r
+ result r = GetLastResult();\r
+ SysTryReturn(NID_UI_CTRL, pCanvas, null, r, "[%s] Propagating.", GetErrorMessage(r));\r
+\r
+ return pCanvas;\r
+}\r
+\r
+Point\r
+LiveboxPopup::TranslateToClientAreaPosition(const Point& position) const\r
+{\r
+ FloatPoint floatPoint = TranslateToClientAreaPositionF(FloatPoint(static_cast<float>(position.x), static_cast<float>(position.y)));\r
+\r
+ return Point(floatPoint.x, floatPoint.y);\r
+}\r
+\r
+FloatPoint\r
+LiveboxPopup::TranslateToClientAreaPositionF(const FloatPoint& position) const\r
+{\r
+ const _LiveboxPopupImpl* pImpl = _LiveboxPopupImpl::GetInstance(*this);
+ SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");\r
+\r
+ return pImpl->TranslateToClientAreaPosition(position);\r
+}\r
+\r
+Point\r
+LiveboxPopup::TranslateFromClientAreaPosition(const Point& clientPosition) const\r
+{\r
+ FloatPoint floatPoint = TranslateFromClientAreaPositionF(FloatPoint(static_cast<float>(clientPosition.x), static_cast<float>(clientPosition.y)));\r
+\r
+ return Point(floatPoint.x, floatPoint.y);\r
+}\r
+\r
+FloatPoint
+LiveboxPopup::TranslateFromClientAreaPositionF(const FloatPoint& clientPosition) const
+{
+ const _LiveboxPopupImpl* pImpl = _LiveboxPopupImpl::GetInstance(*this);
+ SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+ return pImpl->TranslateFromClientAreaPosition(clientPosition);
+}
+
}} // Tizen::Shell
}
result
-LiveboxView::Construct(const AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::Rectangle& rect)
+LiveboxView::Construct(const AppId& appId, const String& providerName, const Rectangle& rect)
{
- return Construct(appId, providerName, rect, L"");
+ return ConstructF(appId, providerName, FloatRectangle(static_cast<float>(rect.x), static_cast<float>(rect.y), static_cast<float>(rect.width), static_cast<float>(rect.height)), L"");
}
result
-LiveboxView::Construct(const AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::Rectangle& rect, const String& userInfo)
+LiveboxView::ConstructF(const AppId& appId, const String& providerName, const FloatRectangle& rect)
+{
+ return ConstructF(appId, providerName, rect, L"");
+}
+
+result
+LiveboxView::Construct(const AppId& appId, const String& providerName, const Rectangle& rect, const String& userInfo)
+{
+ return ConstructF(appId, providerName, FloatRectangle(static_cast<float>(rect.x), static_cast<float>(rect.y), static_cast<float>(rect.width), static_cast<float>(rect.height)), userInfo);
+}
+
+result
+LiveboxView::ConstructF(const AppId& appId, const String& providerName, const FloatRectangle& rect, const String& userInfo)
{
SysTryReturnResult(NID_UI_CTRL, _Aul::IsInstalled(appId) == true, E_APP_NOT_INSTALLED, "The application is not installed.");
}
result
-_LiveboxFrame::Initialize(const Dimension& size)
+_LiveboxFrame::Initialize(const FloatDimension& size)
{
result r = E_SUCCESS;
- const int DEFAULT_WIDTH = 172;
- const int DEFAULT_HEIGHT = 172;
+ const float DEFAULT_WIDTH = 172.0f;
+ const float DEFAULT_HEIGHT = 172.0f;
- Dimension liveboxSize(size);
+ FloatDimension liveboxSize(size);
if (liveboxSize.width <= 0 )
{
liveboxSize.width = DEFAULT_WIDTH;
__pLiveboxFrameRootVisualElement->AttachChild(*pVisualElement);
#endif // MULTI_WINDOW
- Rectangle bounds(0, 0, liveboxSize.width, liveboxSize.height);
- r = SetBounds(bounds);
+ FloatRectangle bounds(0.0f, 0.0f, liveboxSize.width, liveboxSize.height);
+ r = SetBoundsF(bounds);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
r = __pLiveboxFramePresenter->Initialize();
__pLiveboxLayer->SetLayerBounds(bounds);
__pLiveboxLayer->SetShowState(false);
- FloatRectangle fBounds(0.0f, 0.0f, static_cast<float>(bounds.width), static_cast<float>(bounds.height));
-
__pLiveboxFrameRootVisualElement->SetImplicitAnimationEnabled(false);
__pLiveboxFrameRootVisualElement->SetName(L"_LiveboxFrame");
- __pLiveboxFrameRootVisualElement->SetBounds(fBounds);
+ __pLiveboxFrameRootVisualElement->SetBounds(bounds);
__pLiveboxFrameRootVisualElement->SetShowState(false);
SetBackgroundColor(Color(0, 0, 0, 0));
}
result
-_LiveboxFrame::SetLayerBounds(const Rectangle& bounds)
+_LiveboxFrame::SetLayerBounds(const FloatRectangle& bounds)
{
result r = E_SUCCESS;
SysTryReturn(NID_UI_CTRL, pLayer, r, r, "[%s] Propagating.", GetErrorMessage(r));
pLayer->SetLayerBounds(bounds);
-
- FloatRectangle fBounds(0.0f, 0.0f, static_cast<float>(bounds.width), static_cast<float>(bounds.height));
- __pLiveboxFrameRootVisualElement->SetBounds(fBounds);
+ __pLiveboxFrameRootVisualElement->SetBounds(bounds);
}
return r;
void
_LiveboxFrame::OnBoundsChanged(void)
{
- Rectangle bounds = GetBounds();
+ FloatRectangle bounds = GetBoundsF();
- SetLayerBounds(bounds);
+ SetLayerBounds(GetBoundsF());
}
void
static _LiveboxFrame* CreateLiveboxFrameN(void);
virtual ~_LiveboxFrame(void);
- result Initialize(const Tizen::Graphics::Dimension& size);
+ result Initialize(const Tizen::Graphics::FloatDimension& size);
result SetProviderId(const Tizen::Base::String& providerId);
Tizen::Base::String GetProviderId(void) const;
_LiveboxFrame& operator =(const _LiveboxFrame& rhs);
result SetLayerShowState(bool showState);
- result SetLayerBounds(const Tizen::Graphics::Rectangle& bounds);
+ result SetLayerBounds(const Tizen::Graphics::FloatRectangle& bounds);
#if defined(MULTI_WINDOW)
virtual result CreateLayer(void);
#endif // !MULTI_WINDOW
Tizen::Ui::Animations::_RootVisualElement* __pLiveboxFrameRootVisualElement;
Tizen::Ui::_IUiEventManager* __pEventManager;
- Tizen::Graphics::Dimension __liveboxSize;
+ Tizen::Graphics::FloatDimension __liveboxSize;
}; // _LiveboxFrame
}} // Tizen::Shell
}
result
-_LiveboxFrameImpl::Initialize(const Dimension& size)
+_LiveboxFrameImpl::Initialize(const FloatDimension& size)
{
result r = GetCore().Initialize(size);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
virtual const _LiveboxFrame& GetCore(void) const;
virtual _LiveboxFrame& GetCore(void);
- result Initialize(const Tizen::Graphics::Dimension& size);
+ result Initialize(const Tizen::Graphics::FloatDimension& size);
result SetProviderId(const Tizen::Base::String& providerId);
protected:
namespace Tizen { namespace Shell
{
-_LiveboxLayer::_LiveboxLayer(const Dimension& size)
+_LiveboxLayer::_LiveboxLayer(const FloatDimension& size)
: __isReleased(false)
, __size(size)
, __pEcoreEvas(null)
}
void
-_LiveboxLayer::SetLayerBounds(const Rectangle& bounds)
+_LiveboxLayer::SetLayerBounds(const FloatRectangle& bounds)
{
- __size = Dimension(bounds.width, bounds.height);
+ __size = FloatDimension(bounds.width, bounds.height);
ecore_evas_resize(__pEcoreEvas.get(), __size.width, __size.height);
- FloatRectangle fBounds(static_cast<float>(bounds.x), static_cast<float>(bounds.y), static_cast<float>(bounds.width), static_cast<float>(bounds.height));
- SetBounds(fBounds);
+// FloatRectangle fBounds(static_cast<float>(bounds.x), static_cast<float>(bounds.y), static_cast<float>(bounds.width), static_cast<float>(bounds.height));
+ SetBounds(bounds);
}
void*
}
result
-_LiveboxLayer::SyncPixmap(const Dimension& size)
+_LiveboxLayer::SyncPixmap(const FloatDimension& size)
{
SysTryReturn(NID_UI_CTRL, __pRenderBuffer, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
}
result
-_LiveboxLayer::Sync(const Dimension& size)
+_LiveboxLayer::Sync(const FloatDimension& size)
{
SysTryReturn(NID_UI_CTRL, !__providerId.IsEmpty(), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
, public Tizen::Shell::_ILiveboxTouchEventListener
{
public:
- _LiveboxLayer(const Tizen::Graphics::Dimension& size);
+ _LiveboxLayer(const Tizen::Graphics::FloatDimension& size);
virtual ~_LiveboxLayer(void);
virtual result OnConstructed(void);
result SetProviderId(const Tizen::Base::String& providerId);
Tizen::Base::String GetProviderId(void) const;
int GetPixmapId(void) const;
- void SetLayerBounds(const Tizen::Graphics::Rectangle& bounds);
+ void SetLayerBounds(const Tizen::Graphics::FloatRectangle& bounds);
void* AllocCanvas(int size);
void FreeCanvas(void* pCanvas);
int EventHandler(int eventType, double timestamp, double x, double y);
- result SyncPixmap(const Tizen::Graphics::Dimension& size);
+ result SyncPixmap(const Tizen::Graphics::FloatDimension& size);
void OnRendered(void);
virtual result RegisterTouchEventListener(void);
virtual int AcquirePixmap(void);
- virtual result Sync(const Tizen::Graphics::Dimension& size);
+ virtual result Sync(const Tizen::Graphics::FloatDimension& size);
virtual void ReleasePixmap(void);
virtual int OnTouchEventRecevied(int eventType, double timestamp, double x, double y);
protected:
bool __isReleased;
- Tizen::Graphics::Dimension __size;
+ Tizen::Graphics::FloatDimension __size;
private:
struct _EcoreEvasDeleter
: public _LiveboxLayer
{
public:
- _LiveboxPopupLayer(const Dimension& size);
+ _LiveboxPopupLayer(const FloatDimension& size);
virtual ~_LiveboxPopupLayer(void);
private:
virtual result RegisterTouchEventListener(void);
virtual int AcquirePixmap(void);
- virtual result Sync(const Dimension& size);
+ virtual result Sync(const FloatDimension& size);
virtual void ReleasePixmap(void);
};
-_LiveboxPopupLayer::_LiveboxPopupLayer(const Dimension& size)
+_LiveboxPopupLayer::_LiveboxPopupLayer(const FloatDimension& size)
: _LiveboxLayer(size)
{
}
}
result
-_LiveboxPopupLayer::Sync(const Dimension& size)
+_LiveboxPopupLayer::Sync(const FloatDimension& size)
{
result r = _LiveboxProviderManagerImpl::GetInstance()->RequestSyncSharedMemoryForPD(GetProviderId());
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
result
-_LiveboxPopup::Initialize(const Dimension& size)
+_LiveboxPopup::Initialize(const FloatDimension& size)
{
long long ticks = 0;
SystemTime::GetTicks(ticks);
__pLiveboxPopupRootVisualElement->AttachChild(*pVisualElement);
#endif // MULTI_WINDOW
- Rectangle bounds(0, 0, size.width, size.height);
- r = SetBounds(bounds);
+ FloatRectangle bounds(0.0f, 0.0f, size.width, size.height);
+ r = SetBoundsF(bounds);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
r = __pLiveboxPopupPresenter->Initialize();
__pLiveboxPopupLayer->SetLayerBounds(bounds);
__pLiveboxPopupLayer->SetShowState(false);
- FloatRectangle fBounds(0.0f, 0.0f, static_cast<float>(bounds.width), static_cast<float>(bounds.height));
-
__pLiveboxPopupRootVisualElement->SetImplicitAnimationEnabled(false);
__pLiveboxPopupRootVisualElement->SetName(L"_LiveboxPopup");
- __pLiveboxPopupRootVisualElement->SetBounds(fBounds);
+ __pLiveboxPopupRootVisualElement->SetBounds(bounds);
__pLiveboxPopupRootVisualElement->SetShowState(false);
SetBackgroundColor(Color(0, 0, 0, 0));
}
void
-_LiveboxPopup::SetAnchorPosition(const Tizen::Graphics::FloatPoint& position)
+_LiveboxPopup::SetAnchorPosition(const FloatPoint& position)
{
return __pLiveboxPopupPresenter->SetAnchorPosition(position);
}
return __pLiveboxPopupPresenter->GetAnchorPosition();
}
-Rectangle
-_LiveboxPopup::GetLiveboxPopupClientBounds(void) const
+Canvas*\r
+_LiveboxPopup::GetClientAreaCanvasN(void) const\r
+{\r
+ Canvas* pCanvas = GetCanvasFN(GetClientBoundsF());
+ result r = GetLastResult();
+ SysTryReturn(NID_UI_CTRL, pCanvas, null, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return pCanvas;\r
+}\r
+\r
+FloatPoint\r
+_LiveboxPopup::TranslateToClientAreaPosition(const FloatPoint& position) const\r
+{\r
+ FloatRectangle leftTop = GetClientBoundsF();
+
+ return FloatPoint(position.x - leftTop.x, position.y - leftTop.y);\r
+}\r
+\r
+FloatPoint
+_LiveboxPopup::TranslateFromClientAreaPosition(const FloatPoint& clientPosition) const
{
- int leftMargin = 0;
- int rightMargin = 0;
- int topMargin = 0;
- int bottomMargin = 0;
- _ControlOrientation orientation = GetOrientation();
+ FloatRectangle leftTop = GetClientBoundsF();
- GET_SHAPE_CONFIG(LIVEBOX::POPUP_LEFT_MARGIN, orientation, leftMargin);
- GET_SHAPE_CONFIG(LIVEBOX::POPUP_RIGHT_MARGIN, orientation, rightMargin);
- GET_SHAPE_CONFIG(LIVEBOX::POPUP_TOP_MARGIN, orientation, topMargin);
- GET_SHAPE_CONFIG(LIVEBOX::POPUP_BOTTOM_MARGIN, orientation, bottomMargin);
-
- Rectangle bounds = GetBounds();
-
- Rectangle clientBounds(bounds.x + leftMargin, bounds.y + topMargin, bounds.width - leftMargin - rightMargin, bounds.height - topMargin - bottomMargin);
-
- SysLog(NID_UI_CTRL, "[%d %d %d %d]", clientBounds.x, clientBounds.y, clientBounds.width, clientBounds.height);
-
- return clientBounds;
+ return FloatPoint(clientPosition.x + leftTop.x, clientPosition.y + leftTop.y);
}
result
}
result
-_LiveboxPopup::SetLayerBounds(const Rectangle& bounds)
+_LiveboxPopup::SetLayerBounds(const FloatRectangle& bounds)
{
result r = E_SUCCESS;
SysTryReturn(NID_UI_CTRL, pLayer, r, r, "[%s] Propagating.", GetErrorMessage(r));
pLayer->SetLayerBounds(bounds);
-
- FloatRectangle fBounds(0.0f, 0.0f, static_cast<float>(bounds.width), static_cast<float>(bounds.height));
- __pLiveboxPopupRootVisualElement->SetBounds(fBounds);
+ __pLiveboxPopupRootVisualElement->SetBounds(bounds);
}
return r;
}
+FloatRectangle
+_LiveboxPopup::GetLiveboxPopupClientBounds(void) const
+{
+ int leftMargin = 0;
+ int rightMargin = 0;
+ int topMargin = 0;
+ int bottomMargin = 0;
+ _ControlOrientation orientation = GetOrientation();
+
+ GET_SHAPE_CONFIG(LIVEBOX::POPUP_LEFT_MARGIN, orientation, leftMargin);
+ GET_SHAPE_CONFIG(LIVEBOX::POPUP_RIGHT_MARGIN, orientation, rightMargin);
+ GET_SHAPE_CONFIG(LIVEBOX::POPUP_TOP_MARGIN, orientation, topMargin);
+ GET_SHAPE_CONFIG(LIVEBOX::POPUP_BOTTOM_MARGIN, orientation, bottomMargin);
+
+ FloatRectangle bounds = GetBoundsF();
+
+ FloatRectangle clientBounds(bounds.x + leftMargin, bounds.y + topMargin, bounds.width - leftMargin - rightMargin, bounds.height - topMargin - bottomMargin);
+
+ SysLog(NID_UI_CTRL, "[%d %d %d %d]", clientBounds.x, clientBounds.y, clientBounds.width, clientBounds.height);
+
+ return clientBounds;
+}
+
#if defined(MULTI_WINDOW)
result
_LiveboxPopup::CreateLayer(void)
void
_LiveboxPopup::OnBoundsChanged(void)
{
- Rectangle bounds = GetBounds();
-
- SetLayerBounds(bounds);
+ SetLayerBounds(GetBoundsF());
- SetClientBounds(GetLiveboxPopupClientBounds());
+ SetClientBoundsF(GetLiveboxPopupClientBounds());
}
void
namespace Tizen { namespace Graphics
{
class Dimension;
+class FloatDimension;
class FloatPoint;
}} // Tizen::Graphics
static _LiveboxPopup* CreateLiveboxPopupN(void);
virtual ~_LiveboxPopup(void);
- result Initialize(const Tizen::Graphics::Dimension& size);
+ result Initialize(const Tizen::Graphics::FloatDimension& size);
result SetProviderId(const Tizen::Base::String& providerId);
Tizen::Base::String GetProviderId(void) const;
void SetAnchorPosition(const Tizen::Graphics::FloatPoint& position);
Tizen::Graphics::FloatPoint GetAnchorPosition(void) const;
- Tizen::Graphics::Rectangle GetLiveboxPopupClientBounds(void) const;
+ Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const;\r
+ Tizen::Graphics::FloatPoint TranslateToClientAreaPosition(const Tizen::Graphics::FloatPoint& position) const;\r
+ Tizen::Graphics::FloatPoint TranslateFromClientAreaPosition(const Tizen::Graphics::FloatPoint& clientPosition) const;
protected:
_LiveboxPopup(void);
_LiveboxPopup& operator =(const _LiveboxPopup& rhs);
result SetLayerShowState(bool showState);
- result SetLayerBounds(const Tizen::Graphics::Rectangle& bounds);
+ result SetLayerBounds(const Tizen::Graphics::FloatRectangle& bounds);
+ Tizen::Graphics::FloatRectangle GetLiveboxPopupClientBounds(void) const;
#if defined(MULTI_WINDOW)
virtual result CreateLayer(void);
#endif // !MULTI_WINDOW
Tizen::Ui::Animations::_RootVisualElement* __pLiveboxPopupRootVisualElement;
Tizen::Ui::_IUiEventManager* __pEventManager;
- Tizen::Graphics::Dimension __liveboxSize;
+ Tizen::Graphics::FloatDimension __liveboxSize;
}; // _LiveboxPopup
}} // Tizen::Shell
}
result
-_LiveboxPopupImpl::Initialize(const Dimension& size)
+_LiveboxPopupImpl::Initialize(const FloatDimension& size)
{
result r = GetCore().Initialize(size);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
void
-_LiveboxPopupImpl::SetAnchorPosition(const Tizen::Graphics::FloatPoint& position)
+_LiveboxPopupImpl::SetAnchorPosition(const FloatPoint& position)
{
GetCore().SetAnchorPosition(position);
}
return GetCore().GetAnchorPosition();
}
+FloatRectangle\r
+_LiveboxPopupImpl::GetClientAreaBounds(void) const\r
+{\r
+ return GetClientBoundsF();\r
+}\r
+\r
+Canvas*\r
+_LiveboxPopupImpl::GetClientAreaCanvasN(void) const\r
+{\r
+ return GetCore().GetClientAreaCanvasN();\r
+}\r
+\r
+FloatPoint\r
+_LiveboxPopupImpl::TranslateToClientAreaPosition(const FloatPoint& position) const\r
+{\r
+ return GetCore().TranslateToClientAreaPosition(position);\r
+}\r
+\r
+FloatPoint
+_LiveboxPopupImpl::TranslateFromClientAreaPosition(const FloatPoint& clientPosition) const
+{
+ return GetCore().TranslateFromClientAreaPosition(clientPosition);
+}
+
}} // Tizen::Shell
namespace Tizen { namespace Graphics
{
class Dimension;
+class FloatDimension;
class FloatPoint;
}} // Tizen::Graphics
virtual const _LiveboxPopup& GetCore(void) const;
virtual _LiveboxPopup& GetCore(void);
- result Initialize(const Tizen::Graphics::Dimension& size);
+ result Initialize(const Tizen::Graphics::FloatDimension& size);
result SetProviderId(const Tizen::Base::String& providerId);
Tizen::Base::String GetProviderId(void) const;
void SetAnchorPosition(const Tizen::Graphics::FloatPoint& position);
- Tizen::Graphics::FloatPoint GetAnchorPosition(void) const;
+ Tizen::Graphics::FloatPoint GetAnchorPosition(void) const;\r
+ Tizen::Graphics::FloatRectangle GetClientAreaBounds(void) const;\r
+ Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const;\r
+ Tizen::Graphics::FloatPoint TranslateToClientAreaPosition(const Tizen::Graphics::FloatPoint& position) const;\r
+ Tizen::Graphics::FloatPoint TranslateFromClientAreaPosition(const Tizen::Graphics::FloatPoint& clientPosition) const;
protected:
_LiveboxPopupImpl(LiveboxPopup* pPublic, _LiveboxPopup* pCore, const Tizen::Ui::Layout* pPortraitLayout, const Tizen::Ui::Layout* pLandscapeLayout);
}
result
-_LiveboxPopupView::Initialize(const Rectangle& bounds)
+_LiveboxPopupView::Initialize(const FloatRectangle& bounds)
{
- Dimension screenSize = _ControlManager::GetInstance()->GetScreenSize();
+ FloatDimension screenSize = _ControlManager::GetInstance()->GetScreenSizeF();
- Rectangle viewAbsoluteBounds = __pLiveboxView->GetAbsoluteBounds();
+ FloatRectangle viewAbsoluteBounds = __pLiveboxView->GetAbsoluteBoundsF();
double x = (static_cast<double>(viewAbsoluteBounds.x) + static_cast<double>((viewAbsoluteBounds.width) / 2)) / static_cast<double>(screenSize.width);
double y = 0.0f;
int ret = livebox_create_pd_with_position(__pLiveboxView->__pLivebox, x, y, OnLiveboxPopupCreated, this);
SysTryReturn(NID_UI_CTRL, ret == 0, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
- result r = SetBounds(bounds);
+ result r = SetBoundsF(bounds);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return r;
}
void
-_LiveboxPopupView::SetPopupBounds(const Dimension& size)
+_LiveboxPopupView::SetPopupBounds(const FloatDimension& size)
{
- Rectangle absoluteViewBounds = __pLiveboxView->GetAbsoluteBounds();
- Rectangle popupBounds(0, 0, size.width, size.height);
+ FloatRectangle absoluteViewBounds = __pLiveboxView->GetAbsoluteBoundsF();
+ FloatRectangle popupBounds(0, 0, size.width, size.height);
int lower = 0;
int upper = 0;
- Dimension anchorSize = __pLiveboxView->GetAnchorSize();
+ FloatDimension anchorSize = __pLiveboxView->GetAnchorSize();
__pLiveboxView->GetRemainingSpace(lower, upper);
if (lower > upper)
popupBounds.y = absoluteViewBounds.y + absoluteViewBounds.height - anchorSize.height;
}
- SetBounds(popupBounds);
+ SetBoundsF(popupBounds);
SysLog(NID_UI_CTRL, "[%d %d %d %d]", popupBounds.x, popupBounds.y, popupBounds.width, popupBounds.height);
}
}
void
-_LiveboxPopupView::GetTouchPostion(const Tizen::Graphics::Point& point, double& x, double& y) const
+_LiveboxPopupView::GetTouchPostion(const Tizen::Graphics::FloatPoint& point, double& x, double& y) const
{
- Rectangle bounds = GetBounds();
+ FloatRectangle bounds = GetBoundsF();
x = static_cast<double>(point.x) / static_cast<double>(bounds.width);
y = static_cast<double>(point.y) / static_cast<double>(bounds.height);
VisualElementAnimationGroup animationGroup;
animationGroup.SetVisualElementAnimationStatusEventListener(this);
- Rectangle bounds = GetBounds();
- FloatRectangle boundsf(0.0f, 0.0f, static_cast<float>(bounds.width), static_cast<float>(bounds.height));
- FloatRectangle startBounds(0.0f, boundsf.y, boundsf.width, 0.0f);
- FloatRectangle endBounds(boundsf);
+ FloatRectangle bounds = GetBoundsF();
+ FloatRectangle startBounds(0.0f, bounds.y, bounds.width, 0.0f);
+ FloatRectangle endBounds(bounds);
if (!open)
{
- startBounds = boundsf;
- endBounds = FloatRectangle(0.0f, boundsf.y, boundsf.width, 0.0f);
+ startBounds = bounds;
+ endBounds = FloatRectangle(0.0f, bounds.y, bounds.width, 0.0f);
}
VisualElementPropertyAnimation animation1;
bool
_LiveboxPopupView::OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo)
{
- double x = 0.0f;
- double y = 0.0f;
+ double x = 0.0;
+ double y = 0.0;
- GetTouchPostion(touchInfo.GetCurrentPosition(), x, y);
+ Point position = touchInfo.GetCurrentPosition();
+ GetTouchPostion(FloatPoint(static_cast<float>(position.x), static_cast<float>(position.y)), x, y);
livebox_content_event(__pLiveboxView->__pLivebox, PD_MOUSE_DOWN, x, y);
bool
_LiveboxPopupView::OnTouchReleased(const _Control& source, const _TouchInfo& touchInfo)
{
- Rectangle clientBounds(GetClientBounds());
- Point touchPoint(touchInfo.GetCurrentPosition());
+ FloatRectangle clientBounds(GetClientBoundsF());
+
+ Point position = touchInfo.GetCurrentPosition();
+ FloatPoint floatPosition(static_cast<float>(position.x), static_cast<float>(position.y));
- if (!clientBounds.Contains(touchPoint))
+ if (!clientBounds.Contains(floatPosition))
{
PlayAnimation(false);
}
- double x = 0.0f;
- double y = 0.0f;
+ double x = 0.0;
+ double y = 0.0;
- GetTouchPostion(touchInfo.GetCurrentPosition(), x, y);
+ GetTouchPostion(floatPosition, x, y);
livebox_content_event(__pLiveboxView->__pLivebox, PD_MOUSE_UP, x, y);
bool
_LiveboxPopupView::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo)
{
- double x = 0.0f;
- double y = 0.0f;
+ double x = 0.0;
+ double y = 0.0;
- GetTouchPostion(touchInfo.GetCurrentPosition(), x, y);
+ Point position = touchInfo.GetCurrentPosition();
+ GetTouchPostion(FloatPoint(static_cast<float>(position.x), static_cast<float>(position.y)), x, y);
livebox_content_event(__pLiveboxView->__pLivebox, PD_MOUSE_MOVE, x, y);
}
void
-_LiveboxPopupView::OnLiveboxUpdated(const Tizen::Graphics::Bitmap& bitmap, const Tizen::Graphics::Dimension& size)
+_LiveboxPopupView::OnLiveboxUpdated(const Tizen::Graphics::Bitmap& bitmap, const Tizen::Graphics::FloatDimension& size)
{
long long ticks = 0;
SystemTime::GetTicks(ticks);
SysLog(NID_UI_CTRL, "(%d %d) %lld", size.width, size.height, ticks);
- if (size != GetSize())
+ if (size != GetSizeF())
{
SetPopupBounds(size);
}
evas_object_image_data_update_add(__pPixmapObject.get(), 0, 0, width, height);
evas_object_resize(__pPixmapObject.get(), width, height);
- Dimension size(width, height);
- if (size != GetSize())
+ FloatDimension size(width, height);
+ if (size != GetSizeF())
{
SetPopupBounds(size);
}
namespace Tizen { namespace Graphics
{
class Bitmap;
-class Dimension;
-class Point;
+class FloatDimension;
+class FloatPoint;
}} // Tizen::Graphics
namespace Tizen { namespace Ui { namespace Animations
static _LiveboxPopupView* CreateLiveboxPopupN(_LiveboxView& liveBoxView);
virtual ~_LiveboxPopupView(void);
- result Initialize(const Tizen::Graphics::Rectangle& bounds);
+ result Initialize(const Tizen::Graphics::FloatRectangle& bounds);
result AddLiveboxPopupEventListener(const _ILiveboxPopupViewEventListener& listener);
result RemoveLiveboxPopupEventListener(const _ILiveboxPopupViewEventListener& listener);
Tizen::Graphics::Bitmap* GetBitmap(void) const;
_LiveboxPopupView(const _LiveboxPopupView& rhs);
_LiveboxPopupView& operator =(const _LiveboxPopupView& rhs);
- void SetPopupBounds(const Tizen::Graphics::Dimension& size);
+ void SetPopupBounds(const Tizen::Graphics::FloatDimension& size);
void FireLiveboxPopupEvent(bool open);
- void GetTouchPostion(const Tizen::Graphics::Point& point, double& x, double& y) const;
+ void GetTouchPostion(const Tizen::Graphics::FloatPoint& point, double& x, double& y) const;
void PlayAnimation(bool open);
virtual result OnAttached(void);
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);
- void OnLiveboxUpdated(const Tizen::Graphics::Bitmap& bitmap, const Tizen::Graphics::Dimension& size);
+ void OnLiveboxUpdated(const Tizen::Graphics::Bitmap& bitmap, const Tizen::Graphics::FloatDimension& size);
void OnLiveboxUpdated(int pixmap);
static void OnLiveboxPopupCreated(struct livebox *pLivebox, int ret, void* pData);
}
result
-_LiveboxView::Initialize(const AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::Rectangle& rect, const String& userInfo)
+_LiveboxView::Initialize(const AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::FloatRectangle& rect, const String& userInfo)
{
SysLog(NID_UI_CTRL, "appId [%ls]", appId.GetPointer());
SysLog(NID_UI_CTRL, "providerName [%ls]", providerName.GetPointer());
SysLog(NID_UI_CTRL, "[%d %d %d %d]", rect.x, rect.y, rect.width, rect.height);
SysLog(NID_UI_CTRL, "userInfo [%ls]", userInfo.GetPointer());
- result r = SetBounds(rect);
+ result r = SetBoundsF(rect);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
r = __pLiveboxViewPresenter->Initialize(appId, providerName);
return __updated;
}
-Dimension
+FloatDimension
_LiveboxView::GetAnchorSize(void) const
{
Bitmap* pArrowBitmap = null;
pArrowBitmap = __pArrowUpBitmap.get();
}
- return Dimension(pArrowBitmap->GetWidth(), pArrowBitmap->GetHeight());
+ return FloatDimension(pArrowBitmap->GetWidth(), pArrowBitmap->GetHeight());
}
livebox*
r = GetLastResult();
SysTryReturn(NID_UI_CTRL, pParent, r, r, "[%s] Propagating.", GetErrorMessage(r));
- Dimension size = __pLiveboxViewManager->GetLiveboxPopupSize(__pLivebox);
- Rectangle popupBounds(0, 0, size.width, size.height);
- Rectangle bounds = GetBounds();
- Rectangle absoluteBounds = GetAbsoluteBounds();
+ FloatDimension size = __pLiveboxViewManager->GetLiveboxPopupSize(__pLivebox);
+ FloatRectangle popupBounds(0, 0, size.width, size.height);
+ FloatRectangle bounds = GetBoundsF();
+ FloatRectangle absoluteBounds = GetAbsoluteBoundsF();
int lower = 0;
int upper = 0;
- Dimension anchorSize = GetAnchorSize();
+ FloatDimension anchorSize = GetAnchorSize();
GetRemainingSpace(lower, upper);
if (lower > upper)
}
void
-_LiveboxView::GetTouchPostion(const Point& point, double& x, double& y) const
+_LiveboxView::GetTouchPostion(const FloatPoint& point, double& x, double& y) const
{
- Rectangle bounds = GetBounds();
+ FloatRectangle bounds = GetBoundsF();
x = static_cast<double>(point.x) / static_cast<double>(bounds.width);
y = static_cast<double>(point.y) / static_cast<double>(bounds.height);
result r = GetLastResult();
SysTryReturnVoidResult(NID_UI_CTRL, pParent, r, "[%s] Propagating.", GetErrorMessage(r));
- Rectangle parentClientBounds = pParent->GetClientBounds();
- Rectangle viewBounds = GetBounds();
+ FloatRectangle parentClientBounds = pParent->GetClientBoundsF();
+ FloatRectangle viewBounds = GetBoundsF();
lower = viewBounds.y;
upper = parentClientBounds.height - viewBounds.y - viewBounds.height;
void
_LiveboxView::OnBoundsChanged(void)
{
- Dimension size(GetSize());
+ FloatDimension size(GetSizeF());
if (!__resizeFromRemote)
{
int type = livebox_lb_type(__pLivebox);
if ((type == LB_TYPE_BUFFER) || (type == LB_TYPE_PIXMAP))
{
- double x = 0.0f;
- double y = 0.0f;
- GetTouchPostion(touchInfo.GetCurrentPosition(), x, y);
+ double x = 0.0;
+ double y = 0.0;
+
+ Point position = touchInfo.GetCurrentPosition();
+ GetTouchPostion(FloatPoint(static_cast<float>(position.x), static_cast<float>(position.y)), x, y);
livebox_content_event(__pLivebox, LB_MOUSE_DOWN, x, y);
}
bool
_LiveboxView::OnTouchReleased(const _Control& source, const _TouchInfo& touchInfo)
{
- Rectangle clientBounds(GetClientBounds());
- Point touchPoint(touchInfo.GetCurrentPosition());
+ FloatRectangle clientBounds(GetClientBoundsF());
+ Point position(touchInfo.GetCurrentPosition());
+ FloatPoint floatPosition(static_cast<float>(position.x), static_cast<float>(position.y));
- if (clientBounds.Contains(touchPoint))
+ if (clientBounds.Contains(floatPosition))
{
PlayClickAnimation();
}
- double x = 0.0f;
- double y = 0.0f;
- GetTouchPostion(touchInfo.GetCurrentPosition(), x, y);
+ double x = 0.0;
+ double y = 0.0;
+ GetTouchPostion(floatPosition, x, y);
int type = livebox_lb_type(__pLivebox);
if ((type == LB_TYPE_BUFFER) || (type == LB_TYPE_PIXMAP))
int type = livebox_lb_type(__pLivebox);
if ((type == LB_TYPE_BUFFER) || (type == LB_TYPE_PIXMAP))
{
- double x = 0.0f;
- double y = 0.0f;
- GetTouchPostion(touchInfo.GetCurrentPosition(), x, y);
+ double x = 0.0;
+ double y = 0.0;
+
+ Point position = touchInfo.GetCurrentPosition();
+ GetTouchPostion(FloatPoint(static_cast<float>(position.x), static_cast<float>(position.y)), x, y);
livebox_content_event(__pLivebox, LB_MOUSE_MOVE, x, y);
}
}
void
-_LiveboxView::OnLiveboxUpdated(const Bitmap& bitmap, const Dimension& size)
+_LiveboxView::OnLiveboxUpdated(const Bitmap& bitmap, const FloatDimension& size)
{
__resizeFromRemote = true;
- SetSize(size);
+ SetSizeF(size);
__resizeFromRemote = false;
__updated = true;
evas_object_image_alpha_set(__pPixmapObject.get(), EINA_TRUE);
evas_object_raise(__pPixmapObject.get());
- Rectangle absoluteBounds = GetAbsoluteBounds();
+ FloatRectangle absoluteBounds = GetAbsoluteBoundsF();
evas_object_move(__pPixmapObject.get(), absoluteBounds.x, absoluteBounds.y);
evas_object_show(__pPixmapObject.get());
evas_object_resize(__pPixmapObject.get(), width, height);
__resizeFromRemote = true;
- SetSize(Dimension(width, height));
+ SetSizeF(FloatDimension(static_cast<float>(width), static_cast<float>(height)));
__resizeFromRemote = false;
__updated = true;
namespace Tizen { namespace Graphics
{
class Bitmap;
-class Dimension;
+class FloatDimension;
class Point;
}} // Tizen::Graphics
static _LiveboxView* CreateLiveboxViewN(void);
virtual ~_LiveboxView(void);
- result Initialize(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::Rectangle& rect, const Tizen::Base::String& userInfo);
+ result Initialize(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::FloatRectangle& rect, const Tizen::Base::String& userInfo);
_LiveboxPopupView* GetLiveboxPopup(void) const;
Tizen::Base::String GetAppId(void) const;
Tizen::Base::String GetLiveboxId(void) const;
Tizen::Graphics::Bitmap* GetAppIconBitmap(void) const;
Tizen::Graphics::Bitmap* GetBitmap(void) const;
bool IsUpdated(void) const;
- Tizen::Graphics::Dimension GetAnchorSize(void) const;
+ Tizen::Graphics::FloatDimension GetAnchorSize(void) const;
protected:
_LiveboxView(void);
struct livebox* GetNativeLivebox(void) const;
result OpenLiveboxPopup(void);
- void GetTouchPostion(const Tizen::Graphics::Point& point, double& x, double& y) const;
+ void GetTouchPostion(const Tizen::Graphics::FloatPoint& point, double& x, double& y) const;
void PlayClickAnimation(void);
void PlayFlickAnimation(void);
void GetRemainingSpace(int& lower, int& upper) const;
virtual void OnLiveboxPopupViewClosed(void);
virtual void OnDraw(void);
- void OnLiveboxUpdated(const Tizen::Graphics::Bitmap& bitmap, const Tizen::Graphics::Dimension& size);
+ void OnLiveboxUpdated(const Tizen::Graphics::Bitmap& bitmap, const Tizen::Graphics::FloatDimension& size);
void OnLiveboxUpdated(int pixmap);
static Eina_Bool OnPixmapDamaged(void* pData, int type, void* pEvent);
}
result
-_LiveboxViewImpl::Initialize(const AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::Rectangle& rect, const String& userInfo)
+_LiveboxViewImpl::Initialize(const AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::FloatRectangle& rect, const String& userInfo)
{
result r = GetCore().Initialize(appId, providerName, rect, userInfo);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
namespace Tizen { namespace Graphics
{
class Point;
+class FloatRectangle;
}}
namespace Tizen { namespace Shell
virtual const _LiveboxView& GetCore(void) const;
virtual _LiveboxView& GetCore(void);
- result Initialize(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::Rectangle& rect, const Tizen::Base::String& userInfo);
+ result Initialize(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::FloatRectangle& rect, const Tizen::Base::String& userInfo);
protected:
_LiveboxViewImpl(LiveboxView* pPublic, _LiveboxView* pCore);
const char* pCluster = "user,created";
const char* pCategory = "default";
double period = 1.0f;
- int sizeType = GetLiveboxSizeType(pLiveboxView->GetSize());
+ int sizeType = GetLiveboxSizeType(pLiveboxView->GetSizeF());
livebox* pLivebox = livebox_add_with_size(pLiveboxId.get(), pContent.get(), pCluster, pCategory, period, sizeType, OnLiveboxAdded, this);
SysTryReturn(NID_UI_CTRL, pLivebox, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
return pLiveboxView;
}
-Dimension
+FloatDimension
_LiveboxViewManager::GetLiveboxSize(livebox* pLivebox) const
{
- SysTryReturn(NID_UI_CTRL, pLivebox, Dimension(0, 0), E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ SysTryReturn(NID_UI_CTRL, pLivebox, FloatDimension(0, 0), E_SYSTEM, "[E_SYSTEM] A system error occurred.");
int width = 0;
int height = 0;
// SysLog(NID_UI_CTRL, "size [%d %d]", width, height);
- return Dimension(width, height);
+ return FloatDimension(width, height);
}
-Dimension
+FloatDimension
_LiveboxViewManager::GetLiveboxPopupSize(livebox* pLivebox) const
{
- SysTryReturn(NID_UI_CTRL, pLivebox, Dimension(0, 0), E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ SysTryReturn(NID_UI_CTRL, pLivebox, FloatDimension(0, 0), E_SYSTEM, "[E_SYSTEM] A system error occurred.");
int width = 0;
int height = 0;
// SysLog(NID_UI_CTRL, "size [%d %d]", width, height);
- return Dimension(width, height);
+ return FloatDimension(width, height);
}
void
-_LiveboxViewManager::SetLiveboxSize(const _LiveboxView& liveboxView, const Dimension& size)
+_LiveboxViewManager::SetLiveboxSize(const _LiveboxView& liveboxView, const FloatDimension& size)
{
livebox* pLivebox = liveboxView.GetNativeLivebox();
SysTryReturnVoidResult(NID_UI_CTRL, pLivebox, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
}
int
-_LiveboxViewManager::GetLiveboxSizeType(const Tizen::Graphics::Dimension& size) const
+_LiveboxViewManager::GetLiveboxSizeType(const Tizen::Graphics::FloatDimension& size) const
{
int sizeType = LB_SIZE_TYPE_UNKNOWN;
}
Bitmap*
-_LiveboxViewManager::GetBitmapN(void* pBuffer, const Dimension& size) const
+_LiveboxViewManager::GetBitmapN(void* pBuffer, const FloatDimension& size) const
{
SysTryReturn(NID_UI_CTRL, pBuffer, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
void* pBuffer = livebox_acquire_fb(pLivebox);
SysTryReturnVoidResult(NID_UI_CTRL, pBuffer, E_SYSTEM, "[E_SYSTEM] A system error occured.");
- Dimension sourceSize = GetLiveboxSize(pLivebox);
+ FloatDimension sourceSize = GetLiveboxSize(pLivebox);
SysLog(NID_UI_CTRL, "size [%d %d]", sourceSize.width, sourceSize.height);
unique_ptr<Bitmap> pBitmap(GetBitmapN(pBuffer, sourceSize));
void* pBuffer = livebox_acquire_fb(pLivebox);
SysTryReturnVoidResult(NID_UI_CTRL, pBuffer, E_SYSTEM, "[E_SYSTEM] A system error occured.");
- Dimension sourceSize = GetLiveboxSize(pLivebox);
+ FloatDimension sourceSize = GetLiveboxSize(pLivebox);
unique_ptr<Bitmap> pBitmap(GetBitmapN(pBuffer, sourceSize));
SysTryReturnVoidResult(NID_UI_CTRL, pBitmap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
void* pBuffer = livebox_acquire_pdfb(pLivebox);
SysTryReturnVoidResult(NID_UI_CTRL, pBuffer, E_SYSTEM, "[E_SYSTEM] A system error occured.");
- Dimension sourceSize = GetLiveboxPopupSize(pLivebox);
+ FloatDimension sourceSize = GetLiveboxPopupSize(pLivebox);
unique_ptr<Bitmap> pBitmap(GetBitmapN(pBuffer, sourceSize));
SysTryReturnVoidResult(NID_UI_CTRL, pBitmap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
void* pBuffer = livebox_acquire_pdfb(pLivebox);
SysTryReturnVoidResult(NID_UI_CTRL, pBuffer, E_SYSTEM, "[E_SYSTEM] A system error occured.");
- Dimension sourceSize = GetLiveboxPopupSize(pLivebox);
+ FloatDimension sourceSize = GetLiveboxPopupSize(pLivebox);
unique_ptr<Bitmap> pBitmap(GetBitmapN(pBuffer, sourceSize));
SysTryReturnVoidResult(NID_UI_CTRL, pBitmap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
namespace Tizen { namespace Graphics
{
class Bitmap;
-class Dimension;
+class FloatDimension;
class _ICoordinateSystemTransformer;
}} // Tizen::Graphics
livebox* AddLiveboxView(_LiveboxView* pLiveboxView, const Tizen::Base::String& userInfo);
void RemoveLiveboxView(_LiveboxView* pLiveboxView);
_LiveboxView* GetLiveboxView(livebox* pLivebox) const;
- Tizen::Graphics::Dimension GetLiveboxSize(livebox* pLivebox) const;
- Tizen::Graphics::Dimension GetLiveboxPopupSize(livebox* pLivebox) const;
- void SetLiveboxSize(const _LiveboxView& liveboxView, const Tizen::Graphics::Dimension& size);
+ Tizen::Graphics::FloatDimension GetLiveboxSize(livebox* pLivebox) const;
+ Tizen::Graphics::FloatDimension GetLiveboxPopupSize(livebox* pLivebox) const;
+ void SetLiveboxSize(const _LiveboxView& liveboxView, const Tizen::Graphics::FloatDimension& size);
private:
_LiveboxViewManager(void);
_LiveboxViewManager(const _LiveboxViewManager& rhs);
_LiveboxViewManager& operator =(const _LiveboxViewManager& rhs);
- int GetLiveboxSizeType(const Tizen::Graphics::Dimension& size) const;
+ int GetLiveboxSizeType(const Tizen::Graphics::FloatDimension& size) const;
Tizen::Media::MediaPixelFormat GetPixelFormat(Tizen::Graphics::BitmapPixelFormat format) const;
Tizen::Graphics::Bitmap* GetBitmapN(const Tizen::Base::String& fileName) const;
- Tizen::Graphics::Bitmap* GetBitmapN(void* pBuffer, const Tizen::Graphics::Dimension& size) const;
+ Tizen::Graphics::Bitmap* GetBitmapN(void* pBuffer, const Tizen::Graphics::FloatDimension& size) const;
bool IsGlMode(void) const;
void OnLiveboxCreated(livebox* pLivebox);