const _ControlHandle controlHandle = pControlImpl->GetCore().GetHandle();
- TouchEventInfo publicTouchInfo;
+ TouchEventInfo publicTouchInfo;
- _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo);
+ _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo);
SysTryReturn(NID_UI, pEventArg, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
- publicTouchInfo.Construct(*pEventArg);
+ publicTouchInfo.Construct(*pEventArg);
- if (pEventArg)
- {
- delete pEventArg;
- pEventArg = null;
- }
+ if (pEventArg)
+ {
+ delete pEventArg;
+ pEventArg = null;
+ }
isFiltered = __impl.__pPublicPropagatedTouchEventListener->OnTouchMoved(control, publicTouchInfo);
- if (isFiltered)
- {
- return true;
- }
+ if (isFiltered)
+ {
+ return true;
+ }
_Control* pControl = _ControlManager::GetInstance()->GetObject(controlHandle);
SysTryReturn(NID_UI, pControl, true, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Target control is deleted.");
- }
+ }
return __impl.CallOnTouchMoved(source, touchInfo);
}
const _ControlHandle controlHandle = pControlImpl->GetCore().GetHandle();
- TouchEventInfo publicTouchInfo;
+ TouchEventInfo publicTouchInfo;
- _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo);
+ _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo);
SysTryReturn(NID_UI, pEventArg, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
- publicTouchInfo.Construct(*pEventArg);
+ publicTouchInfo.Construct(*pEventArg);
- if (pEventArg)
- {
- delete pEventArg;
- pEventArg = null;
- }
+ if (pEventArg)
+ {
+ delete pEventArg;
+ pEventArg = null;
+ }
isFiltered = __impl.__pPublicPropagatedTouchEventListener->OnTouchCanceled(control, publicTouchInfo);
- if (isFiltered)
- {
- return true;
- }
+ if (isFiltered)
+ {
+ return true;
+ }
_Control* pControl = _ControlManager::GetInstance()->GetObject(controlHandle);
SysTryReturn(NID_UI, pControl, true, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Target control is deleted.");
- }
+ }
return __impl.CallOnTouchCanceled(source, touchInfo);
}
Control& control = static_cast<Control&>(pControlImpl->GetPublic());
- KeyEventInfo* pKeyEventInfo = new (std::nothrow) KeyEventInfo(static_cast<KeyCode>(keyInfo.GetKeyCode()),
- static_cast<KeyModifier>(keyInfo.GetKeyModifier()));
+ KeyEventInfo keyEventInfo(static_cast<KeyCode>(keyInfo.GetKeyCode()), static_cast<KeyModifier>(keyInfo.GetKeyModifier()));
- isFiltered = __impl.__pPublicPropagatedKeyEventListener->TranslateKeyEventInfo(control, *pKeyEventInfo);
+ isFiltered = __impl.__pPublicPropagatedKeyEventListener->TranslateKeyEventInfo(control, keyEventInfo);
if (isFiltered)
{
- keyInfo.SetKeyCode(static_cast<_KeyCode>(pKeyEventInfo->GetKeyCode()));
- keyInfo.SetKeyModifier(static_cast<_KeyModifier>(pKeyEventInfo->GetKeyModifier()));
+ keyInfo.SetKeyCode(static_cast<_KeyCode>(keyEventInfo.GetKeyCode()));
+ keyInfo.SetKeyModifier(static_cast<_KeyModifier>(keyEventInfo.GetKeyModifier()));
return true;
}
}
bool isFiltered = false;
- //SysLog(NID_UI, ">>> [impl.1] OnKeyPressed(%d, %d)", keyInfo.GetKeyCode(), keyInfo.GetKeyModifier());
-
if (__impl.__pPublicPropagatedKeyEventListener != null)
{
_ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData());
Control& control = static_cast<Control&>(pControlImpl->GetPublic());
- KeyEventInfo* pKeyEventInfo = new (std::nothrow) KeyEventInfo(static_cast<KeyCode>(keyInfo.GetKeyCode()),
- static_cast<KeyModifier>(keyInfo.GetKeyModifier()));
-
- //SysLog(NID_UI, ">>> [impl.2] OnKeyPressed(%d, %d)", keyInfo.GetKeyCode(), keyInfo.GetKeyModifier());
+ KeyEventInfo keyEventInfo(static_cast<KeyCode>(keyInfo.GetKeyCode()), static_cast<KeyModifier>(keyInfo.GetKeyModifier()));
- isFiltered = __impl.__pPublicPropagatedKeyEventListener->OnKeyPressed(control, *pKeyEventInfo);
- if (isFiltered)
- {
- return true;
- }
+ isFiltered = __impl.__pPublicPropagatedKeyEventListener->OnKeyPressed(control, keyEventInfo);
+ if (isFiltered)
+ {
+ return true;
}
-
- //SysLog(NID_UI, ">>> [impl.3] OnKeyPressed(%d, %d)", keyInfo.GetKeyCode(), keyInfo.GetKeyModifier());
+ }
if (&source == &__core)
{
bool isFiltered = false;
- //SysLog(NID_UI, ">>> [impl.1] OnKeyReleased(%d, %d)", keyInfo.GetKeyCode(), keyInfo.GetKeyModifier());
-
if (__impl.__pPublicPropagatedKeyEventListener != null)
{
_ControlImpl* pControlImpl = static_cast<_ControlImpl*>(source.GetUserData());
Control& control = static_cast<Control&>(pControlImpl->GetPublic());
- KeyEventInfo* pKeyEventInfo = new (std::nothrow) KeyEventInfo(static_cast<KeyCode>(keyInfo.GetKeyCode()),
- static_cast<KeyModifier>(keyInfo.GetKeyModifier()));
-
- //SysLog(NID_UI, ">>> [impl.2] OnKeyReleased(%d, %d)", keyInfo.GetKeyCode(), keyInfo.GetKeyModifier());
+ KeyEventInfo keyEventInfo(static_cast<KeyCode>(keyInfo.GetKeyCode()), static_cast<KeyModifier>(keyInfo.GetKeyModifier()));
- isFiltered = __impl.__pPublicPropagatedKeyEventListener->OnKeyReleased(control, *pKeyEventInfo);
- if (isFiltered)
- {
- return true;
- }
+ isFiltered = __impl.__pPublicPropagatedKeyEventListener->OnKeyReleased(control, keyEventInfo);
+ if (isFiltered)
+ {
+ return true;
}
-
- //SysLog(NID_UI, ">>> [impl.3] OnKeyReleased(%d, %d)", keyInfo.GetKeyCode(), keyInfo.GetKeyModifier());
+ }
if (&source == &__core)
{
Control& control = static_cast<Control&>(pControlImpl->GetPublic());
- KeyEventInfo* pKeyEventInfo = new (std::nothrow) KeyEventInfo(static_cast<KeyCode>(keyInfo.GetKeyCode()),
- static_cast<KeyModifier>(keyInfo.GetKeyModifier()));
+ KeyEventInfo keyEventInfo(static_cast<KeyCode>(keyInfo.GetKeyCode()), static_cast<KeyModifier>(keyInfo.GetKeyModifier()));
- isFiltered = __impl.__pPublicPropagatedKeyEventListener->OnPreviewKeyPressed(control, *pKeyEventInfo);
+ isFiltered = __impl.__pPublicPropagatedKeyEventListener->OnPreviewKeyPressed(control, keyEventInfo);
if (isFiltered)
{
return true;
Control& control = static_cast<Control&>(pControlImpl->GetPublic());
- KeyEventInfo* pKeyEventInfo = new (std::nothrow) KeyEventInfo(static_cast<KeyCode>(keyInfo.GetKeyCode()),
- static_cast<KeyModifier>(keyInfo.GetKeyModifier()));
+ KeyEventInfo keyEventInfo(static_cast<KeyCode>(keyInfo.GetKeyCode()), static_cast<KeyModifier>(keyInfo.GetKeyModifier()));
- isFiltered = __impl.__pPublicPropagatedKeyEventListener->OnPreviewKeyReleased(control, *pKeyEventInfo);
+ isFiltered = __impl.__pPublicPropagatedKeyEventListener->OnPreviewKeyReleased(control, keyEventInfo);
if (isFiltered)
{
return true;
if (pEv->buttons == _MOUSE_BUTTON_LEFT || pEv->buttons == _MOUSE_BUTTON_NONE)
{
- _TouchEvent event(pEv->multi.device, _TOUCH_PRESSED, pEv->root.x, pEv->root.y, pEv->timestamp, null);
+ _TouchEvent event(pEv->multi.device, _TOUCH_PRESSED, pEv->root.x, pEv->root.y, pEv->timestamp, null);
- result r = GetLastResult();
- if (r != E_SUCCESS)
- {
- SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r));
- return ECORE_CALLBACK_PASS_ON;
- }
+ result r = GetLastResult();
+ if (r != E_SUCCESS)
+ {
+ SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r));
+ return ECORE_CALLBACK_PASS_ON;
+ }
- event.Send();
+ event.Send();
}
else
{
//_MouseEvent event(pEv->multi.device, _TOUCH_PRESSED, pEv->root.x, pEv->root.y, 0, pEv->buttons, pEv->timestamp, null);
_MouseEvent event(pEv->multi.device, _TOUCH_PRESSED, pEv->root.x, pEv->root.y, 0, _MOUSE_BUTTON_RIGHT, pEv->timestamp, null);
- result r = GetLastResult();
- if (r != E_SUCCESS)
- {
- SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r));
- return ECORE_CALLBACK_PASS_ON;
- }
+ result r = GetLastResult();
+ if (r != E_SUCCESS)
+ {
+ SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r));
+ return ECORE_CALLBACK_PASS_ON;
+ }
- event.Send();
+ event.Send();
_UiEventManager* pEventManager = _UiEventManager::GetInstance();
SysTryReturn(NID_UI, pEventManager, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] System error occurred.");
- pEventManager->GenerateKeyEvent(KEY_PRESSED, _KEY_OEM_2, _KEY_MODIFIER_NONE, false);
- pEventManager->GenerateKeyEvent(KEY_RELEASED, _KEY_OEM_2, _KEY_MODIFIER_NONE, false);
+ pEventManager->GenerateKeyEvent(KEY_PRESSED, _KEY_BACK, _KEY_MODIFIER_NONE, false);
+ pEventManager->GenerateKeyEvent(KEY_RELEASED, _KEY_BACK, _KEY_MODIFIER_NONE, false);
}
SetLastResult(E_SUCCESS);
//_MouseEvent event(pEv->multi.device, _TOUCH_RELEASED, pEv->root.x, pEv->root.y, 0, pEv->buttons, pEv->timestamp, null);
_MouseEvent event(pEv->multi.device, _TOUCH_RELEASED, pEv->root.x, pEv->root.y, 0, _MOUSE_BUTTON_RIGHT, pEv->timestamp, null);
-
result r = GetLastResult();
if (r!= E_SUCCESS)
{