New APIs are added about element index.
authorBumseung Cho <bumseung.cho@samsung.com>
Wed, 29 May 2013 10:27:01 +0000 (19:27 +0900)
committerBumseung Cho <bumseung.cho@samsung.com>
Wed, 29 May 2013 10:27:48 +0000 (19:27 +0900)
Change-Id: I9d9412777a61e9f06f97d399eb824df566fdf360
Signed-off-by: Bumseung Cho <bumseung.cho@samsung.com>
src/ui/FUi_AccessibilityManager.cpp
src/ui/inc/FUi_AccessibilityManager.h

index a12e4f3..5f09dc8 100644 (file)
@@ -1637,7 +1637,10 @@ _AccessibilityManager::MoveFocus(_AccessibilityFocusDirection direction)
                                pListenerList = null;
                        }
                }
-               __pTargetContainer->SetCurrentFocusedElement(null);
+               if(__pTargetContainer)
+               {
+                       __pTargetContainer->SetCurrentFocusedElement(null);
+               }
                if (focusManaged)
                {
                        __pTargetElement = pElement;
@@ -2287,6 +2290,50 @@ _AccessibilityManager::IsTargetContainerValid(void)
        return false;
 }
 bool
+_AccessibilityManager::IsFirstElementGainedFocus(void)
+{
+       int count = __candidateList.GetCount();
+       if(count == 0)
+       {
+               return false;
+       }
+       if(__pTargetElement == null)
+       {
+               return false;
+       }
+       _AccessibilityElement* pElement = null;
+       if(__candidateList.GetAt(0, pElement) == E_SUCCESS)
+       {
+               if(pElement == __pTargetElement)
+               {
+                       return true;
+               }
+       }
+       return false;
+}\r
+bool
+_AccessibilityManager::IsLastElementGainedFocus(void)
+{
+       int count = __candidateList.GetCount();
+       if(count == 0)
+       {
+               return false;
+       }
+       if(__pTargetElement == null)
+       {
+               return false;
+       }
+       _AccessibilityElement* pElement = null;
+       if(__candidateList.GetAt(count-1, pElement) == E_SUCCESS)
+       {
+               if(pElement == __pTargetElement)
+               {
+                       return true;
+               }
+       }
+       return false;
+}
+bool
 _AccessibilityManager::IsVisible(_AccessibilityElement* pElement)
 {
        return IsVisible(pElement->GetParent());
index 487c7e8..1ab302f 100644 (file)
@@ -104,6 +104,9 @@ public:
        bool IsScreenReaderActivated(void);
        float GetLargeFontSize(void);
 
+       bool IsFirstElementGainedFocus(void);
+       bool IsLastElementGainedFocus(void);
+
        void NeedRefreshItem(void);
 
        void RequestToDrawFocusUi(void);