{
_AccessibilityManager::GetInstance()->Unregister(__handle);
}
+ int count = __childContainerList.GetCount();
+ _AccessibilityContainer* pContainer = null;
+ for (int i = 0; i< count;i++)
+ {
+ if(__childContainerList.GetAt(i, pContainer) == E_SUCCESS)
+ {
+ pContainer->SetParent(null);
+ }
+ }
+ if(__pParent)
+ {
+ __pParent->RemoveChildContainer(*this);
+ }
}
_Control&
result r = E_SYSTEM;
_AccessibilityContainer* _child = &const_cast<_AccessibilityContainer&>(child);
- _child->SetParent(*this);
+ _child->SetParent(this);
__childContainerList.Add(_child);
return r;
}
{
return E_SUCCESS;
}
- _AccessibilityManager::GetInstance()->NeedRefreshItem();
+ _AccessibilityManager::GetInstance()->NeedRefreshItem();
return __elementList.Add(&const_cast<_AccessibilityElement&>(element));
}
pElement->SetParent(*this);
}
}
- _AccessibilityManager::GetInstance()->NeedRefreshItem();
+ _AccessibilityManager::GetInstance()->NeedRefreshItem();
return __elementList.AddItems(elementList);
}
_AccessibilityContainer::InsertElement(const _AccessibilityElement& element, int index)
{
const_cast<_AccessibilityElement&>(element).SetParent(*this);
- _AccessibilityManager::GetInstance()->NeedRefreshItem();
+ _AccessibilityManager::GetInstance()->NeedRefreshItem();
return __elementList.InsertAt(&const_cast<_AccessibilityElement&>(element), index);
}
}
}
__elementList.RemoveAll();
- _AccessibilityManager::GetInstance()->NeedRefreshItem();
+ _AccessibilityManager::GetInstance()->NeedRefreshItem();
return E_SUCCESS;
}
}
bool
-_AccessibilityContainer::SetParent(const _AccessibilityContainer& parent)
+_AccessibilityContainer::SetParent(const _AccessibilityContainer* pParent)
{
- if (__pParent == null)
- {
- __pParent = &const_cast<_AccessibilityContainer&>(parent);
- return true;
- }
- else
- {
- return false;
- }
+ __pParent = const_cast<_AccessibilityContainer*>(pParent);
}
_AccessibilityContainer*
{
return __pParent;
}
-
+_AccessibilityContainer*
+_AccessibilityContainer::GetRootParent(void) const
+{
+ _AccessibilityContainer* pParent = __pParent;
+ while(pParent != null && pParent->GetParent() != null)
+ {
+ pParent = pParent->GetParent();
+ }
+ return pParent;
+}
void
_AccessibilityContainer::SetCurrentFocusedElement(_AccessibilityElement*pElement)
{
#include <FGrpBitmap.h>
#include <FBase_StringConverter.h>
#include <FGrp_BitmapImpl.h>
+#include <FSys_SystemTimeImpl.h>
#include "FUi_AccessibilityGesture.h"
#include "FUi_AccessibilitySystemSettingLoader.h"
#include "FUi_AccessibilityTtsPlayer.h"
using namespace Tizen::Graphics;
using namespace Tizen::Ui::Animations;
using namespace Tizen::Ui::Controls;
-
+using namespace Tizen::System;
namespace
{
class GuidePopupTimer
}
pFrame = UiApp::GetInstance()->GetAppFrame()->GetFrame();
-
if (pFrame != null)
{
int accesibilityVisualElementLevel = 3000;
controlList.Add(pControl);
}
DownVisitor(*pControl, controlList);
- _AccessibilityItemComparer<_Control*> controlComparer;
- //controlList.Sort(controlComparer);
+ count = controlList.GetCount();
+ Dimension screen = _ResourceManager::GetInstance()->GetLogicalScreenSizen();
+ int margin = _ControlManager::GetInstance()->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT ? screen.width : screen.height;
+
+ for(int i = 0 ; i < count ; i++)
+ {
+ if (controlList.GetAt(i, pControl) == E_SUCCESS)
+ {
+ FloatRectangle rect = pControl->GetAbsoluteBoundsF();
+ if (rect.x + rect.width <= 0.0f || (rect.x) >= margin)
+ {
+ bool inside = false;
+ _Control* _pControl = pControl;
+ while(_pControl)
+ {
+ if(dynamic_cast<_IScrollableContainer*>(_pControl))
+ {
+ if (rect.x + rect.width > 0.0f && (rect.x) < margin)
+ {
+ inside = true;
+ break;
+ }
+ }
+ _pControl = _pControl->GetParent();
+ }
+ if(!inside)
+ {
+ _AccessibilityContainer* pContainer = pControl->GetAccessibilityContainer()->GetRootParent();
+ if(pContainer != null)
+ {
+ rect = pContainer->GetAbsoluteBounds();
+ if (rect.x + rect.width > 0.0f && (rect.x) < margin)
+ {
+ inside = true;
+ }
+ }
+ }
+ if(!inside)
+ {
+ controlList.Remove(pControl);
+ i--;
+ count--;
+ }
+ }
+ }
+ }
for (int i = 0; i < controlList.GetCount() ; i++)
{
if (controlList.GetAt(i, pControl) == E_SUCCESS)
}
_AccessibilityElement* pElement = null;
-
- Dimension screen = _ResourceManager::GetInstance()->GetLogicalScreenSizen();
- int margin = _ControlManager::GetInstance()->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT ? screen.width : screen.height;
-
for (int i = 0 ; i < count ; i++)
{
r = __candidateList.GetAt(i, pElement);
__candidateList.Remove(pElement);
__candidateList.InsertAt(pElement, 0);
}
- if (pElement->GetAbsoluteBounds().x + pElement->GetAbsoluteBounds().width <= 1.0
- || (int)(pElement->GetAbsoluteBounds().x) >= margin - 1)
- {
- __candidateList.Remove(pElement);
- i--;
- count--;
- }
}
return;
}
SetGestureMode(MODE_TAP);
__candidateList.RemoveAll();
}
+ _Control* pControl = null;
Point pt((int)point.x, (int)point.y);
- _Control* pControl = _ControlManager::GetInstance()->GetTopmostTouchedControl(pt);
+ _TouchManager* pTouchManager = _TouchManager::GetInstance();
+ _Control* pCapturedControl = pTouchManager->GetCapturedControl();
+ if (pCapturedControl)
+ {
+ if(pCapturedControl->GetAbsoluteBounds().Contains(pt))
+ {
+ pControl = pCapturedControl;
+ }
+ }
+ else
+ {
+ pControl = _ControlManager::GetInstance()->GetTopmostTouchedControl(pt);
+ }
if (pControl == null)
{
return false;
ReadContent(L"Unavailable");
return true;
}
-
if (__pTargetElement->GetSupportOperatingGesture())
{
+ long long tick = 0;
+ if (_SystemTimeImpl::GetTicks(tick) != E_SUCCESS)
+ {
+ tick = 0;
+ }
FloatRectangle rect = __pTargetElement->GetAbsoluteBounds();
Point _point((int)(rect.x + rect.width/2), (int)(rect.y + rect.height/2));
- _UiTouchEvent pressedEvent(_pControl->GetHandle(), _TouchInfo(0, _TOUCH_PRESSED, _point, false, 0));
- _UiTouchEvent releasedEvent(_pControl->GetHandle(), _TouchInfo(0, _TOUCH_RELEASED, _point, false, 0));
+ _UiTouchEvent pressedEvent(_pControl->GetHandle(), _TouchInfo(0, _TOUCH_PRESSED, _point, false, tick));
+ _UiTouchEvent releasedEvent(_pControl->GetHandle(), _TouchInfo(0, _TOUCH_RELEASED, _point, false, tick+1));
pressedEvent.SetAccessibilityEvent(true);
releasedEvent.SetAccessibilityEvent(true);
_Control* pControl = _ControlManager::GetInstance()->GetTopmostTouchedControl(pt);
if (pControl == null)
{
+ SysLog(NID_UI, "Two finger panning is started. but control is null");
return false;
}
-
- _UiTouchEvent pressedEvent(pControl->GetHandle(), _TouchInfo(0, _TOUCH_PRESSED, pt, false, 0));
+ long long tick = 0;
+ if (_SystemTimeImpl::GetTicks(tick) != E_SUCCESS)
+ {
+ tick = 0;
+ }
+ _UiTouchEvent pressedEvent(pControl->GetHandle(), _TouchInfo(0, _TOUCH_PRESSED, pt, false, tick));
unsigned int pointId = 0;
pointId = _TouchManager::GetInstance()->GeneratePointId(0);
_UiEventManager::GetInstance()->SendEvent(pressedEvent);
__pPanningControl = pControl;
- _UiTouchEvent movedEvent(__pPanningControl->GetHandle(), _TouchInfo(0, _TOUCH_MOVED, pt, false, 0));
- pointId = _TouchManager::GetInstance()->GetPointId(0);
- _UiEventManager::GetInstance()->SendEvent(movedEvent);
SetGestureMode(MODE_PANNING);
- }
+ SysLog(NID_UI, "Two finger panning is started. x:%d, y:%d", pt.x, pt.y);
+ }
break;
case _ACCESSIBILITY_GESTURE_TYPE_TWO_FINGER_PANNING_CHANGED:
{
if (__pPanningControl == null || GetGestureMode() != MODE_PANNING)
{
SetGestureMode(MODE_TAP);
+ SysLog(NID_UI, "Two finger panning is started. but control is null");
return false;
}
+ long long tick = 0;
+ if (_SystemTimeImpl::GetTicks(tick) != E_SUCCESS)
+ {
+ tick = 0;
+ }
Point pt((int)point.x, (int)point.y);
- _UiTouchEvent movedEvent(__pPanningControl->GetHandle(), _TouchInfo(0, _TOUCH_MOVED, pt, false, 0));
+ _UiTouchEvent movedEvent(__pPanningControl->GetHandle(), _TouchInfo(0, _TOUCH_MOVED, pt, false, tick));
unsigned int pointId = 0;
pointId = _TouchManager::GetInstance()->GetPointId(0);
_UiEventManager::GetInstance()->SendEvent(movedEvent);
+ SysLog(NID_UI, "Two finger panning is moved. x:%d, y:%d", pt.x, pt.y);
}
break;
case _ACCESSIBILITY_GESTURE_TYPE_TWO_FINGER_PANNING_FINISHED:
if (__pPanningControl == null || GetGestureMode() != MODE_PANNING)
{
SetGestureMode(MODE_TAP);
+ SysLog(NID_UI, "Two finger panning is started. but control is null");
return false;
}
+ long long tick = 0;
+ if (_SystemTimeImpl::GetTicks(tick) != E_SUCCESS)
+ {
+ tick = 0;
+ }
Point pt((int)point.x, (int)point.y);
- _UiTouchEvent releasedEvent(__pPanningControl->GetHandle(), _TouchInfo(0, _TOUCH_RELEASED, pt, false, 0));
+ _UiTouchEvent releasedEvent(__pPanningControl->GetHandle(), _TouchInfo(0, _TOUCH_RELEASED, pt, false, tick));
unsigned int pointId = 0;
pointId = _TouchManager::GetInstance()->GetPointId(0);
_UiEventManager::GetInstance()->SendEvent(releasedEvent);
__pPanningControl = null;
SetGestureMode(MODE_TAP);
+ SysLog(NID_UI, "Two finger panning is finished. x:%d, y:%d", pt.x, pt.y);
}
break;
default: