,__pAppWidgetPopupProviderFactory(null)
,__pAppWidgetPopupProvider(null)
,__AppWidgetPopupTouchEventListener(null)
- ,__isAppWidgetFrameReady(false)
- ,__pPendingTouchEvent(null)
{
SysLog(NID_APP, "");
}
{
SysLog(NID_APP, "Enter.");
- /*if( appId == App::App::GetInstance()->GetAppId())
- {
- //TODO: optimizing for local request
- }
- else*/
+// if( appId == App::App::GetInstance()->GetAppId())
+// {
+// //TODO: optimizing for local request
+// }
+// else
{
_AppWidgetManagerProxy* pProxy = _AppWidgetManagerProxy::GetInstance();
SysTryReturnResult(NID_APP, pProxy, E_SYSTEM, "Failed to get proxy instance!");
}
else if (operationId == APPWIDGET_ON_TOUCH)
{
- int eventType = 0;
- double timeStamp = 0.0f;
- double x = 0.0f;
- double y = 0.0f;
-
- const String* pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_EVENT_TYPE));
- SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_EVENT_TYPE.GetPointer() );
- Integer::Parse(*pValue, eventType);
-
- pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_TIME_STAMP));
- SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_TIME_STAMP.GetPointer() );
- Double::Parse(*pValue, timeStamp);
-
- pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_X));
- SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_X.GetPointer() );
- Double::Parse(*pValue, x);
-
- pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_Y));
- SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_Y.GetPointer() );
- Double::Parse(*pValue, y);
-
- if( __isAppWidgetFrameReady == false )
- {
- delete __pPendingTouchEvent;
- __pPendingTouchEvent = new PendingTouchEvent(eventType, timeStamp, x, y);
- }
- else
- {
- this->ForwardTouchEvent(*pInstanceId, eventType, timeStamp, x, y);
- }
+ SysLog(NID_APP, "[APPWIDGET_ON_TOUCH] touch events will be delivered after provider is initialized");
+// int eventType = 0;
+// double timeStamp = 0.0f;
+// double x = 0.0f;
+// double y = 0.0f;
+
+// const String* pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_EVENT_TYPE));
+// SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_EVENT_TYPE.GetPointer() );
+// Integer::Parse(*pValue, eventType);
+//
+// pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_TIME_STAMP));
+// SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_TIME_STAMP.GetPointer() );
+// Double::Parse(*pValue, timeStamp);
+//
+// pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_X));
+// SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_X.GetPointer() );
+// Double::Parse(*pValue, x);
+//
+// pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_Y));
+// SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_Y.GetPointer() );
+// Double::Parse(*pValue, y);
+//
+// this->ForwardTouchEvent(*pInstanceId, eventType, timeStamp, x, y);
}
SysLog(NID_APP, "Exit");
return E_SUCCESS;
}
else if (operationId == APPWIDGET_POPUP_ON_TOUCH)
{
- SysAssertf(pArgs->GetCount() == 6, "invalid argc(%d)", pArgs->GetCount() );
-
- int eventType = 0;
- double timeStamp = 0.0f;
- double x = 0.0f;
- double y = 0.0f;
-
- const String* pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_EVENT_TYPE));
- SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_EVENT_TYPE.GetPointer() );
- Integer::Parse(*pValue, eventType);
-
- pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_TIME_STAMP));
- SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_TIME_STAMP.GetPointer() );
- Double::Parse(*pValue, timeStamp);
-
- pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_X));
- SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_X.GetPointer() );
- Double::Parse(*pValue, x);
-
- pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_Y));
- SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_Y.GetPointer() );
- Double::Parse(*pValue, y);
-
- ForwardTouchEventForPD(*pInstanceId, eventType, timeStamp, x, y);
+ SysAssertf(false, "[Invalid state]");
+// SysAssertf(pArgs->GetCount() == 6, "invalid argc(%d)", pArgs->GetCount() );
+//
+// int eventType = 0;
+// double timeStamp = 0.0f;
+// double x = 0.0f;
+// double y = 0.0f;
+//
+// const String* pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_EVENT_TYPE));
+// SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_EVENT_TYPE.GetPointer() );
+// Integer::Parse(*pValue, eventType);
+//
+// pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_TIME_STAMP));
+// SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_TIME_STAMP.GetPointer() );
+// Double::Parse(*pValue, timeStamp);
+//
+// pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_X));
+// SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_X.GetPointer() );
+// Double::Parse(*pValue, x);
+//
+// pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_Y));
+// SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_Y.GetPointer() );
+// Double::Parse(*pValue, y);
+//
+// ForwardTouchEventForPD(*pInstanceId, eventType, timeStamp, x, y);
}
else
{
result r = pProxy->RequestSyncSharedMemory(instanceId, width, height);
- if( __isAppWidgetFrameReady == false)
- {
- __isAppWidgetFrameReady = true;
- if( __pPendingTouchEvent)
- {
- this->ForwardTouchEvent(instanceId, __pPendingTouchEvent->eventType, __pPendingTouchEvent->timeStamp, __pPendingTouchEvent->x, __pPendingTouchEvent->y);
- delete __pPendingTouchEvent;
- __pPendingTouchEvent = null;
- }
- }
-
return r;
}