}
if (__start)
{
- return;
+ Stop();
}
__start = true;
__mode = mode;
if (IsScreenReaderActivated())
{
- __pTtsPlayer->SetLocale(__pSettingLoader->GetLocale());
__pTtsPlayer->Activate();
}
pGuidePopupTimer = new (std::nothrow) GuidePopupTimer;
{
if (__pTtsPlayer)
{
- //ShowPopup(content);
+// ShowPopup(content);
__pTtsPlayer->ReadGrammar(content);
}
return E_SUCCESS;
}
else if (mode == _ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM_OF_CONTENTS)
{
+ if(__pTitleElement && __pTitleElement->IsUpdated())
+ {
+ return;
+ }
for (int i = 0 ; i < count ; i++)
{
r = __candidateList.GetAt(i, pElement);
delete pList;
pList = null;
}
- //ShowPopup();
+// ShowPopup();
__pTtsPlayer->ReadGrammar(element.GetReadingContents());
}
return E_SUCCESS;
}
if (__pTargetContainer == &container)
{
+ if(__pTargetContainer)
+ {
+ __pTargetContainer->SetCurrentFocusedElement(null);
+ }
__pTargetContainer = null;
__pTargetElement = null;
}
{
if (controlList.GetAt(i, pControl) == E_SUCCESS)
{
- FloatRectangle rect = pControl->GetAbsoluteBoundsF();
+ FloatRectangle rect = pControl->GetAbsoluteBoundsF(true);
if (rect.x + rect.width <= 0.0f || (rect.x) >= margin)
{
bool inside = false;
pControl = &(pPositionByControlListElement->GetParent()->GetOwner());
while (pControl)
{
- rect = pControl->GetAbsoluteBounds();
+ rect = pControl->GetAbsoluteBounds(true);
if (rect.y >0)
{
break;
__candidateList.Add(pElement);
elementPositionByControlList.Remove(pElement);
elementPositionByControlList.InsertAt(pElement, index);
- elementPositionList.Remove(pElement);
- elementPositionList.InsertAt(pElement, index);
index++;
}
}
{
elementPositionList.Remove(pPositionByControlListElement);
elementPositionList.InsertAt(pPositionByControlListElement, index);
+ elementPositionByControlList.Remove(pPositionByControlListElement);
+ elementPositionByControlList.InsertAt(pPositionByControlListElement, index);
__candidateList.Add(pPositionByControlListElement);
index++;
continue;
{
return;
}
-
_AccessibilityElement* pElement = null;
+ _AccessibilityElement* pElement2 = null;
+ int selectedHeader = -1;
+ int startHeader = -1;
+ int endHeader = -1;
+ int selectedFooter = -1;
+ int startFooter = -1;
+ int endFooter = -1;
for (int i = 0 ; i < count ; i++)
{
r = __candidateList.GetAt(i, pElement);
- if (r != E_SUCCESS)
+ if(pElement->GetParent()->GetPriority() == ACCESSIBILITY_PRIORITY_TOP)
{
- continue;
+ if (startHeader == -1)
+ {
+ startHeader=i;
+ }
+ endHeader = i;
+ }
+ if(pElement->GetParent()->GetPriority() == ACCESSIBILITY_PRIORITY_BOTTOM)
+ {
+ if (startFooter == -1)
+ {
+ startFooter=i;
+ }
+ endFooter = i;
+ }
+ }
+ if(startHeader != -1 && endHeader - startHeader > 0)
+ {
+ for(int i = startHeader; i <= endHeader ; i++)
+ {
+ r = __candidateList.GetAt(i, pElement);
+ if (r != E_SUCCESS)
+ {
+ continue;
+ }
+ selectedHeader = i;
+ for(int j = i +1 ; j <= endHeader; j++)
+ {
+ r = __candidateList.GetAt(j, pElement2);
+ if (r != E_SUCCESS)
+ {
+ continue;
+ }
+ if(pElement->GetAbsoluteBounds().x > pElement2->GetAbsoluteBounds().x)
+ {
+ pElement = pElement2;
+ selectedHeader = j;
+ }
+ }
+ if(selectedHeader != i)
+ {
+ __candidateList.Remove(pElement);
+ __candidateList.InsertAt(pElement, i);
+ }
}
- if (pElement->GetName() == "HeaderTitleText")
+ }
+ if(startFooter != -1 && endFooter - startFooter > 0)
+ {
+ for(int i = startFooter; i <= endFooter ; i++)
{
- __candidateList.Remove(pElement);
- __candidateList.InsertAt(pElement, 0);
+ r = __candidateList.GetAt(i, pElement);
+ if (r != E_SUCCESS)
+ {
+ continue;
+ }
+ selectedFooter = i;
+ for(int j = i +1 ; j <= endFooter; j++)
+ {
+ r = __candidateList.GetAt(j, pElement2);
+ if (r != E_SUCCESS)
+ {
+ continue;
+ }
+ if(pElement->GetAbsoluteBounds().x > pElement2->GetAbsoluteBounds().x)
+ {
+ pElement = pElement2;
+ selectedFooter = j;
+ }
+ }
+ if(selectedFooter != i)
+ {
+ __candidateList.Remove(pElement);
+ __candidateList.InsertAt(pElement, i);
+ }
}
}
+
return;
}
void
{
pElement = null;
__pTargetElement = null;
+ if(__pTargetContainer)
+ {
+ __pTargetContainer->SetCurrentFocusedElement(null);
+ }
__pTargetContainer = null;
+
}
else
{
void
_AccessibilityManager::RequestToDrawFocusUi()
{
- if (__pTargetContainer)
+ if (__targetControlHandle.IsValid() && __pTargetContainer->IsContains(*__pTargetElement))
{
//HidePopup();
DrawFocusUi(*__pTargetElement);
SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] System error");
}
}
-
+
__pFocusVe->SetShowState(true);
delete pCanvas;
}
_Window* pWindow = _ControlManager::GetInstance()->GetTopVisibleWindow();
if (!(pWindow->IsLayoutChangable()))
{
- Rectangle topWindowAbsBounds = pWindow->GetAbsoluteBounds();
+ Rectangle topWindowAbsBounds = pWindow->GetAbsoluteBounds(true);
pt.x = pt.x + topWindowAbsBounds.x;
pt.y = pt.y + topWindowAbsBounds.y;
}
pControl = _ControlManager::GetInstance()->GetTopmostTouchedControl(pt);
- if (pControl == null || !(pControl->GetAbsoluteBounds().Contains(pt)))
+ if (pControl == null || !(pControl->GetAbsoluteBounds(true).Contains(pt)))
{
return false;
}
_AccessibilityContainer* pAccContainer = pControl->GetAccessibilityContainer();
- while(!(pAccContainer->IsActivated()))
+ _AccessibilityElement* pElement = null;
+ while(pElement == null)
{
+ pElement = pAccContainer->Hit(pt);
+ if(pElement)
+ {
+ break;
+ }
_Control* _pControl = pAccContainer->GetOwner().GetParent();
if (_pControl == null)
{
return false;
}
pAccContainer = _pControl->GetAccessibilityContainer();
- if (pAccContainer == null)
+ if(pAccContainer == null)
{
return false;
}
}
- _AccessibilityElement* pElement = pAccContainer->Hit(pt);
- if (pElement == null)
- {
- return false;
- }
if (__pTargetElement == pElement)
{
{
if (!IsContainerValid(__pTargetContainer))
{
- return false;
- }
-
- _Control* pControl = &(__pTargetContainer->GetOwner());
- if (pControl->GetEnableState() == false)
- {
- ReadContent(L"Unavailable");
- return true;
+ if (MoveFocus(_ACCESSIBILITY_FOCUS_DIRECTION_PREVIOUS))
+ {
+ SetGestureMode(MODE_FOCUS_MOVE);
+ }
+ break;
}
+ bool returnValue = false;
LinkedListT<_IAccessibilityListener*>* pList = static_cast<LinkedListT<_IAccessibilityListener*>*>(__pTargetContainer->GetListenerListN());
if (pList != null)
{
_IAccessibilityListener* pListener = null;
if (pList->GetAt(i, pListener) == E_SUCCESS)
{
- pListener->OnAccessibilityValueIncreased(*__pTargetContainer, *__pTargetElement);
+ if(pListener->OnAccessibilityValueIncreased(*__pTargetContainer, *__pTargetElement) && returnValue == false)
+ {
+ returnValue = true;
+ }
}
}
delete pList;
}
+
+ if (returnValue)
+ {
+ _Control* pControl = &(__pTargetContainer->GetOwner());
+ if (pControl->GetEnableState() == false)
+ {
+ ReadContent(L"Unavailable");
+ return true;
+ }
+ }
+ else
+ {
+ if (MoveFocus(_ACCESSIBILITY_FOCUS_DIRECTION_PREVIOUS))
+ {
+ SetGestureMode(MODE_FOCUS_MOVE);
+ }
+ }
}
break;
case _ACCESSIBILITY_GESTURE_TYPE_VALUE_DECREASED:
{
if (!IsContainerValid(__pTargetContainer))
{
- return false;
- }
-
- _Control* pControl = &(__pTargetContainer->GetOwner());
- if (pControl->GetEnableState() == false)
- {
- ReadContent(L"Unavailable");
- return true;
+ if (MoveFocus(_ACCESSIBILITY_FOCUS_DIRECTION_NEXT))
+ {
+ SetGestureMode(MODE_FOCUS_MOVE);
+ }
+ break;
}
-
+ bool returnValue = false;
LinkedListT<_IAccessibilityListener*>* pList = static_cast<LinkedListT<_IAccessibilityListener*>*>(__pTargetContainer->GetListenerListN());
if (pList != null)
{
_IAccessibilityListener* pListener = null;
if (pList->GetAt(i, pListener) == E_SUCCESS)
{
- pListener->OnAccessibilityValueDecreased(*__pTargetContainer, *__pTargetElement);
+ if(pListener->OnAccessibilityValueDecreased(*__pTargetContainer, *__pTargetElement) && returnValue == false)
+ {
+ returnValue = true;
+ }
}
}
delete pList;
}
+ if (returnValue)
+ {
+ _Control* pControl = &(__pTargetContainer->GetOwner());
+ if (pControl->GetEnableState() == false)
+ {
+ ReadContent(L"Unavailable");
+ return true;
+ }
+ }
+ else
+ {
+ if (MoveFocus(_ACCESSIBILITY_FOCUS_DIRECTION_NEXT))
+ {
+ SetGestureMode(MODE_FOCUS_MOVE);
+ }
+ }
}
break;
case _ACCESSIBILITY_GESTURE_TYPE_TWO_FINGER_PANNING_STARTED:
void
_AccessibilityManager::OnChangedLocale(void)
{
- if (__pTtsPlayer && __pSettingLoader)
- {
- __pTtsPlayer->SetLocale(__pSettingLoader->GetLocale());
- }
}
void
{
if (__pTtsPlayer)
{
- __pTtsPlayer->SetLocale(__pSettingLoader->GetLocale());
__pTtsPlayer->Activate();
RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM);
}
{
__pTtsPlayer->Deactivate();
EraseFocusUi();
+ if(__pTargetContainer)
+ {
+ __pTargetContainer->SetCurrentFocusedElement(null);
+ }
__pTargetContainer = null;
__pTargetElement = null;
__pTitleElement = null;
}
return false;
}
+void
+_AccessibilityManager::ResetFocusInformation(void)
+{
+ EraseFocusUi();
+ if(__pTargetContainer)
+ {
+ __pTargetContainer->SetCurrentFocusedElement(null);
+ }
+ __pTargetContainer = null;
+ __pTargetElement = null;
+ __pTitleElement = null;
+ __mode = MODE_TAP;
+ __targetControlHandle = _ControlHandle();
+ __focusedControlHandle = _ControlHandle();
+ __readingPopupParentHandle = _ControlHandle();
+}
bool
_AccessibilityManager::IsVisible(_AccessibilityElement* pElement)
{