//
-// Open Service Platform
// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
//
-// Licensed under the Flora License, Version 1.0 (the License);
+// Licensed under the Flora License, Version 1.1 (the License);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
#include <FApp_AppControlManager.h>
#include "FShell_AppWidgetManagerService.h"
+#include "FShell_AppWidgetContext.h"
#include "FShell_AppWidgetPopupContext.h"
namespace Tizen { namespace Shell { namespace App
const char APPWIDGET_POPUP_ON_DESTROY[] = "http://tizen.org/appcontrol/appwidgetpopup/destroy";
const char APPWIDGET_POPUP_ON_TOUCH[] = "http://tizen.org/appcontrol/appwidgetpopup/touch";
-const String ARG_KEY_X = L"_X";
-const String ARG_KEY_Y = L"_Y";
-const String ARG_KEY_WIDTH = L"_Width";
-const String ARG_KEY_HEIGHT = L"_Height";
-
-_AppWidgetPopupContext::_AppWidgetPopupContext(const String& info, const String& appId, const String& instanceId, int width, int height, int priority)
+_AppWidgetPopupContext::_AppWidgetPopupContext(const String& info, const String& appId, const String& instanceId, int width, int height, int priority, _AppWidgetContext* pParent)
:_AppWidgetContextBase(TYPE_PD, info, appId, instanceId, width, height, priority)
{
+ __pParent = pParent;
SysLog(NID_SHELL, "appId(%ls), instanceId(%ls), width(%d), height(%d)", __providerId.GetPointer(), __instanceId.GetPointer(), __width, __height);
}
pArgs->Add(new String(ARG_KEY_X), new String(Double::ToString(x)));
pArgs->Add(new String(ARG_KEY_Y), new String(Double::ToString(y)));
- pArgs->Add(new String(ARG_KEY_WIDTH), new String(Integer::ToString(width)));
- pArgs->Add(new String(ARG_KEY_HEIGHT), new String(Integer::ToString(height)));
+ pArgs->Add(new String(ARG_KEY_POPUP_WIDTH), new String(Integer::ToString(width)));
+ pArgs->Add(new String(ARG_KEY_POPUP_HEIGHT), new String(Integer::ToString(height)));
return SendRequestToApp( __appId, APPWIDGET_POPUP_ON_CREATE, pArgs.get());
}
return E_SUCCESS;
}
+Tizen::Base::Collection::HashMap*
+_AppWidgetPopupContext::CreateRequestArgs(void)
+{
+ HashMap* pArgs = new (std::nothrow) HashMap(SingleObjectDeleter);
+ pArgs->Construct();
+ pArgs->Add(new String(ARG_KEY_INSTANCE_ID), new String(__instanceId));
+ pArgs->Add(new String(ARG_KEY_PROVIDER_NAME), new String(__providerName));
+ pArgs->Add(new String(ARG_KEY_USER_INFO), new String(__userInfo));
+ pArgs->Add(new String(ARG_KEY_WIDTH), new String(Integer::ToString(__pParent->__width)));
+ pArgs->Add(new String(ARG_KEY_HEIGHT), new String(Integer::ToString(__pParent->__height)));
+
+ return pArgs;
+}
+
} } } // Tizen::Shell::App {