Fixed jira issue.
authorKeuckdo Bang <keuckdo.bang@samsung.net>
Wed, 3 Jul 2013 10:43:52 +0000 (19:43 +0900)
committerKeuckdo Bang <keuckdo.bang@samsung.net>
Wed, 3 Jul 2013 10:43:52 +0000 (19:43 +0900)
Change-Id: I03249a385d6f2d83ac1f663031f9c9e9afd2ab2b

src/ui/controls/FUiCtrl_Form.cpp
src/ui/controls/FUiCtrl_FormImpl.cpp
src/ui/controls/FUiCtrl_Indicator.cpp
src/ui/controls/FUiCtrl_IndicatorManager.cpp
src/ui/inc/FUiCtrl_Indicator.h

index c469777..b35abad 100644 (file)
@@ -1495,25 +1495,6 @@ _Form::SetActionBarsTranslucent(unsigned long actionBars, bool translucent)
                return E_INVALID_OPERATION;
        }
 
-       if ((actionBars & FORM_ACTION_BAR_INDICATOR))
-       {
-               if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
-               {
-                       if (!(__formStyle & FORM_STYLE_INDICATOR))
-                       {
-                               SysLog(NID_UI_CTRL,
-                                       "[E_INVALID_OPERATION] The current state of the instance prohibits the execution of the specified operation.");
-                               return E_INVALID_OPERATION;
-                       }
-               }
-               else
-               {
-                       SysLog(NID_UI_CTRL,
-                               "[E_INVALID_OPERATION] The current state of the instance prohibits the execution of the specified operation.");
-                       return E_INVALID_OPERATION;
-               }
-       }
-
        result r = E_SUCCESS;
 
        Color bgColor(0, 0, 0, 0);
@@ -2797,6 +2778,13 @@ _Form::OnChildVisibleStateChanged(const _Control& child)
                                        {
                                                adjHeight = 0.0f;
                                        }
+                                       else
+                                       {
+                                               if (FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle())
+                                               {
+                                                       adjHeight = 0.0f;
+                                               }
+                                       }
                                }
                        }
                }
@@ -3169,6 +3157,7 @@ _Form::AttachedToMainTree(void)
                        }
                        else
                        {
+                               AddIndicatorObject();
                                r = SetIndicatorShowState(false);
                                SetIndicatorAutoHide(false, false);
                                SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
@@ -3300,7 +3289,7 @@ _Form::OnBoundsChanged(void)
        {
                if (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & GetFormStyle())
                {
-                       GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, GetOrientation(), indicatorheight);
+                       GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight);
                }
        }
 
index 4428b27..8176e42 100644 (file)
@@ -1281,6 +1281,13 @@ _FormImpl::OnChangeLayout(_ControlOrientation orientation)
                                        {
                                                indicatorBounds.height = 0.0f;
                                        }
+                                       else
+                                       {
+                                               if (FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle())
+                                               {
+                                                       adjHeight = 0.0f;
+                                               }
+                                       }
                                }
                        }
                }
index eb5f090..29fe16e 100644 (file)
@@ -33,6 +33,7 @@
 #include "FUiCtrl_Form.h"
 #include "FUiCtrl_Indicator.h"
 #include "FUiCtrl_IndicatorManager.h"
+#include "FUiAnim_EflVisualElementSurfaceImpl.h"
 
 using namespace Tizen::Base::Runtime;
 using namespace Tizen::Graphics;
@@ -615,12 +616,38 @@ _Indicator::OnMessageHandle(Ecore_Evas *pEe, int msgDomain, int msgId, void *dat
                return;
        }
 
+       Evas_Object* pPortraitIndicatorEvasObject = (Evas_Object*)ecore_evas_data_get(pEe, pPortPublicKey);
+       Evas_Object* pLandscapeIndicatorEvasObject = (Evas_Object*)ecore_evas_data_get(pEe, pLandPublicKey);
+
        if (msgDomain == MSG_DOMAIN_CONTROL_INDICATOR)
        {
-               /*if (msg_id == MSG_ID_INDICATOR_REPEAT_EVENT)
+               if (msgId == MSG_ID_INDICATOR_REPEAT_EVENT)
                {
-                       int *repeat = static_cast<int*>(data);
-               }*/
+                       int *repeat = (int*)data;
+                       if (1 == *repeat)
+                       {
+                               if (pPortraitIndicatorEvasObject)
+                          {
+                                       evas_object_repeat_events_set(pPortraitIndicatorEvasObject, EINA_TRUE);
+                          }
+                               if (pLandscapeIndicatorEvasObject)
+                               {
+                          evas_object_repeat_events_set(pLandscapeIndicatorEvasObject, EINA_TRUE);
+                               }
+                       }
+                       else
+                       {
+                               if (pPortraitIndicatorEvasObject)
+                          {
+                          evas_object_repeat_events_set(pPortraitIndicatorEvasObject, EINA_FALSE);
+                          }
+                               if (pLandscapeIndicatorEvasObject)
+                               {
+                          evas_object_repeat_events_set(pLandscapeIndicatorEvasObject, EINA_FALSE);
+                               }
+                       }
+               }
+
                if (msgId == MSG_ID_INDICATOR_TYPE)
                {
                        _IndicatorTypeMode *pIndicatorTypeMode = (_IndicatorTypeMode*)(data);
@@ -642,4 +669,27 @@ _Indicator::OnMessageHandle(Ecore_Evas *pEe, int msgDomain, int msgId, void *dat
        }
 }
 
+HitTestResult
+_Indicator::OnHitTest(const Tizen::Graphics::FloatPoint& point)
+{
+       if (!IsVisible())
+       {
+               return HIT_TEST_NOWHERE;
+       }
+
+       if (!GetBounds().Contains(point))
+       {
+               return HIT_TEST_NOWHERE;
+       }
+
+       _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*this->__pCurrentVisualElement);
+       _EflVisualElementSurfaceImpl* pSurface = dynamic_cast<_EflVisualElementSurfaceImpl*>(_VisualElementSurfaceImpl::GetInstance(*pImpl->GetNativeNode()->GetSurface()));
+       Evas_Object* pImageObject = (Evas_Object*)pSurface->GetNativeHandle();
+
+       if (!evas_object_repeat_events_get(pImageObject))
+               return HIT_TEST_MATCH;
+       else
+               return HIT_TEST_NOWHERE;
+}
+
 }}} // Tizen::Ui::Controls
index 82e2621..ff7ae83 100644 (file)
@@ -33,6 +33,8 @@
 #include "FUiCtrl_IndicatorManager.h"
 #include "FUiCtrl_Form.h"
 #include "FUiCtrl_Frame.h"
+#include "FUiCtrl_Popup.h"
+#include "FUiCtrl_Keypad.h"
 
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Graphics;
@@ -251,6 +253,14 @@ _IndicatorManager::AddWindow(_Window* pWindow)
 {
        result r = E_SUCCESS;
 
+       _Frame* pFrame = dynamic_cast<_Frame*>(pWindow);
+       _Popup* pPopup = dynamic_cast<_Popup*>(pWindow);
+       _Keypad* pKeypad = dynamic_cast<_Keypad*>(pWindow);
+
+       if ((pFrame == null) && (pPopup == null) && (pKeypad ==null))
+       {
+               return E_SUCCESS;
+       }
 
        IndicatorComponent* pIndicatorComponentArray = MakeIndicatorComponentArrayN(pWindow);
 
@@ -265,6 +275,14 @@ _IndicatorManager::DeleteWindow(_Window* pWindow)
        result r = E_SUCCESS;
        IndicatorComponent* pIndicatorComponentArray = null;
 
+       _Frame* pFrame = dynamic_cast<_Frame*>(pWindow);
+       _Popup* pPopup = dynamic_cast<_Popup*>(pWindow);
+       _Keypad* pKeypad = dynamic_cast<_Keypad*>(pWindow);
+
+       if ((pFrame == null) && (pPopup == null) && (pKeypad ==null))
+       {
+               return E_SUCCESS;
+       }
 
        r = __indicatorMap.GetValue(pWindow, pIndicatorComponentArray);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS && pIndicatorComponentArray, r, r, "[%s] Propagating.", GetErrorMessage(r));
index 1f4795c..1c9e3d7 100644 (file)
@@ -73,6 +73,8 @@ public:
                static void OnDisconnected(Ecore_Evas *pEe);
                static void OnMessageHandle(Ecore_Evas *pEe, int msgDomain, int msgId, void *data, int size);
 
+               virtual Animations::HitTestResult OnHitTest(const Tizen::Graphics::FloatPoint& point);
+
 private:
                _Indicator(const _Indicator& value);
                _Indicator& operator =(const _Indicator& value);