Removed CR
authorHeeJu Kang <mobum.kang@samsung.com>
Thu, 11 Apr 2013 07:34:45 +0000 (16:34 +0900)
committerHeeJu Kang <mobum.kang@samsung.com>
Thu, 11 Apr 2013 07:34:45 +0000 (16:34 +0900)
Change-Id: I8cf0c80892276413c3e4e86e308e577615b3fa57
Signed-off-by: HeeJu Kang <mobum.kang@samsung.com>
inc/FShellAppWidgetFrame.h
inc/FShellAppWidgetManager.h
inc/FShellAppWidgetPopup.h
inc/FShellAppWidgetProviderManager.h
inc/FShellAppWidgetView.h
inc/FShellIAppWidgetViewEventListener.h
src/FShell_AppWidgetLayer.cpp
src/FShell_AppWidgetPopup.cpp
src/FShell_AppWidgetView.cpp
src/FShell_AppWidgetViewManager.cpp
src/FShell_IAppWidgetViewEventListener.h

index 8bd7d01..afc3a0e 100644 (file)
@@ -66,8 +66,8 @@ public:
         * @param[in]   size                            The new width and height
         * @exception   E_SUCCESS           The method is successful.
         * @exception   E_INVALID_ARG           A specified input parameter is invalid.
-        * @exception   E_UNSUPPORTED_OPERATION   The Emulator or target device does not support the required feature.\r
-        *                                                                      For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.\r
+        * @exception   E_UNSUPPORTED_OPERATION   The Emulator or target device does not support the required feature.
+        *                                                                      For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
         * @remarks             Before calling this method, check whether the feature is supported by %Tizen::System::SystemInfo::GetValue() methods.
         * @see AppWidgetProvider::OnAppWidgetProviderInitializing()
         */
@@ -83,8 +83,8 @@ public:
         * @param[in]   size                            The new width and height
         * @exception   E_SUCCESS           The method is successful.
         * @exception   E_INVALID_ARG           A specified input parameter is invalid.
-        * @exception   E_UNSUPPORTED_OPERATION   The Emulator or target device does not support the required feature.\r
-        *                                                                      For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.\r
+        * @exception   E_UNSUPPORTED_OPERATION   The Emulator or target device does not support the required feature.
+        *                                                                      For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
         * @remarks             Before calling this method, check whether the feature is supported by %Tizen::System::SystemInfo::GetValue() methods.
         * @see AppWidgetProvider::OnAppWidgetProviderInitializing()
         */
index 8b7856f..1a144cb 100755 (executable)
@@ -56,15 +56,15 @@ public:
         *
         * @since       2.1
         *
-        * @feature        %http://tizen.org/feature/shell.appwidget\r
-        *\r
+        * @feature        %http://tizen.org/feature/shell.appwidget
+        *
         * @return             A pointer to the %AppWidgetManager instance, @n
         *                             else @c null if it fails
         *
         * @exception      E_SUCCESS       The method is successful.
         * @exception      E_SYSTEM        The method cannot proceed due to a severe system error.
-        * @exception      E_UNSUPPORTED_OPERATION   The Emulator or target device does not support the required feature.\r
-        *                 For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.\r
+        * @exception      E_UNSUPPORTED_OPERATION   The Emulator or target device does not support the required feature.
+        *                 For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
         *
         * @remarks      - The specific error code can be accessed using the GetLastResult() method.
         *               - Before calling this method, check whether the feature is supported by %Tizen::System::SystemInfo::GetValue() methods.
index 16bb249..1d46a3c 100644 (file)
@@ -66,8 +66,8 @@ public:
         * @param[in]   size                            The new width and height
         * @exception   E_SUCCESS           The method is successful.
         * @exception   E_INVALID_ARG           A specified input parameter is invalid.
-        * @exception   E_UNSUPPORTED_OPERATION   The Emulator or target device does not support the required feature.\r
-        *                                                                      For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.\r
+        * @exception   E_UNSUPPORTED_OPERATION   The Emulator or target device does not support the required feature.
+        *                                                                      For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
         * @remarks             Before calling this method, check whether the feature is supported by %Tizen::System::SystemInfo::GetValue() methods.
         * @see AppWidgetProvider::OnAppWidgetPopupProviderInitializing()
         */
@@ -83,8 +83,8 @@ public:
         * @param[in]   size                            The new width and height
         * @exception   E_SUCCESS           The method is successful.
         * @exception   E_INVALID_ARG           A specified input parameter is invalid.
-        * @exception   E_UNSUPPORTED_OPERATION   The Emulator or target device does not support the required feature.\r
-        *                                                                      For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.\r
+        * @exception   E_UNSUPPORTED_OPERATION   The Emulator or target device does not support the required feature.
+        *                                                                      For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
         * @remarks             Before calling this method, check whether the feature is supported by %Tizen::System::SystemInfo::GetValue() methods.
         * @see AppWidgetProvider::OnAppWidgetPopupProviderInitializing()
         */
index 5d2b18b..b327915 100755 (executable)
@@ -57,17 +57,17 @@ public:
         *
         * @since       2.1
         *
-        * @feature        %http://tizen.org/feature/shell.appwidget\r
+        * @feature        %http://tizen.org/feature/shell.appwidget
         *
         * @return         A pointer to the %AppWidgetProviderManager instance, @n
         *                                 else @c null if it fails
-        * @exception      E_SUCCESS       The method is successful.\r
+        * @exception      E_SUCCESS       The method is successful.
         * @exception      E_SYSTEM        The method cannot proceed due to a severe system error.
-        * @exception      E_UNSUPPORTED_OPERATION   The Emulator or target device does not support the required feature.\r
-        *                 For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.\r
+        * @exception      E_UNSUPPORTED_OPERATION   The Emulator or target device does not support the required feature.
+        *                 For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
         *
         * @remarks      - The specific error code can be accessed using the GetLastResult() method.
-        *               - Before calling this method, check whether the feature is supported by %Tizen::System::SystemInfo::GetValue() methods.\r
+        *               - Before calling this method, check whether the feature is supported by %Tizen::System::SystemInfo::GetValue() methods.
         */
        static AppWidgetProviderManager* GetInstance(void);
 
index 5b62ec9..2044f46 100644 (file)
@@ -70,7 +70,7 @@ public:
         * Initializes this instance of %AppWidgetView with the specified parameters.
         *
         * @since       2.1
-        * @feature             %http://tizen.org/feature/shell.appwidget\r
+        * @feature             %http://tizen.org/feature/shell.appwidget
         * @return      An error code
         * @param[in]   appId                           The AppId of the installed application
         * @param[in]   providerName            The name of the AppWidget provider
@@ -81,8 +81,8 @@ public:
         * @exception   E_INVALID_ARG           A specified input parameter is invalid.
         * @exception   E_APP_NOT_INSTALLED     The application is not installed.
         * @exception   E_OBJ_NOT_FOUND         The specified AppWidget provider is not found.
-        * @exception   E_UNSUPPORTED_OPERATION   The Emulator or target device does not support the required feature.\r
-        *                                                                      For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.\r
+        * @exception   E_UNSUPPORTED_OPERATION   The Emulator or target device does not support the required feature.
+        *                                                                      For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
         * @remarks             Before calling this method, check whether the feature is supported by %Tizen::System::SystemInfo::GetValue() methods.
         */
        result Construct(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::FloatRectangle& rect);
@@ -103,8 +103,8 @@ public:
         * @exception   E_INVALID_ARG           A specified input parameter is invalid.
         * @exception   E_APP_NOT_INSTALLED     The application is not installed.
         * @exception   E_OBJ_NOT_FOUND         The specified AppWidget provider is not found.
-        * @exception   E_UNSUPPORTED_OPERATION   The Emulator or target device does not support the required feature.\r
-        *                                                                      For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.\r
+        * @exception   E_UNSUPPORTED_OPERATION   The Emulator or target device does not support the required feature.
+        *                                                                      For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
         * @remarks             Before calling this method, check whether the feature is supported by %Tizen::System::SystemInfo::GetValue() methods.
         */
        result Construct(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::FloatRectangle& rect, const Tizen::Base::String& userInfo);
index 812f5cc..d6d83a3 100644 (file)
@@ -44,62 +44,62 @@ class _OSP_EXPORT_ IAppWidgetViewEventListener
        : public Tizen::Base::Runtime::IEventListener
 {
 public:
-       /**\r
-        * This polymorphic destructor should be overridden if required.\r
-        * This way, the destructors of the derived classes are called when the destructor of this interface is called.\r
-        *\r
-        * @since       2.1\r
+       /**
+        * This polymorphic destructor should be overridden if required.
+        * This way, the destructors of the derived classes are called when the destructor of this interface is called.
+        *
+        * @since       2.1
         */
        virtual ~IAppWidgetViewEventListener(void) {}
 
-       /**\r
+       /**
         * Called when a AppWidgetProvider instance is about to be removed. @n
-        *\r
-        * @since 2.1\r
-        *\r
+        *
+        * @since 2.1
+        *
         * @param[in]  appWidgetView    The source of the event
-        */\r
+        */
        virtual void OnAppWidgetProviderRemoved(AppWidgetView& appWidgetView) = 0;
 
 protected:
-       //\r
-       // This method is for internal use only. Using this method can cause behavioral, security-related,\r
-       // and consistency-related issues in the application.\r
-       //\r
-       // Following method is reserved and may change its name at any time without prior notice.\r
-       //\r
-       virtual void IAppWidgetViewEventListener_Reserved1(void) {}\r
-\r
-       //\r
-       // This method is for internal use only. Using this method can cause behavioral, security-related,\r
-       // and consistency-related issues in the application.\r
-       //\r
-       // Following method is reserved and may change its name at any time without prior notice.\r
-       //\r
-       virtual void IAppWidgetViewEventListener_Reserved2(void) {}\r
-\r
-       //\r
-       // This method is for internal use only. Using this method can cause behavioral, security-related,\r
-       // and consistency-related issues in the application.\r
-       //\r
-       // Following method is reserved and may change its name at any time without prior notice.\r
-       //\r
-       virtual void IAppWidgetViewEventListener_Reserved3(void) {}\r
-\r
-       //\r
-       // This method is for internal use only. Using this method can cause behavioral, security-related,\r
-       // and consistency-related issues in the application.\r
-       //\r
-       // Following method is reserved and may change its name at any time without prior notice.\r
-       //\r
-       virtual void IAppWidgetViewEventListener_Reserved4(void) {}\r
-\r
-       //\r
-       // This method is for internal use only. Using this method can cause behavioral, security-related,\r
-       // and consistency-related issues in the application.\r
-       //\r
-       // Following method is reserved and may change its name at any time without prior notice.\r
-       //\r
+       //
+       // This method is for internal use only. Using this method can cause behavioral, security-related,
+       // and consistency-related issues in the application.
+       //
+       // Following method is reserved and may change its name at any time without prior notice.
+       //
+       virtual void IAppWidgetViewEventListener_Reserved1(void) {}
+
+       //
+       // This method is for internal use only. Using this method can cause behavioral, security-related,
+       // and consistency-related issues in the application.
+       //
+       // Following method is reserved and may change its name at any time without prior notice.
+       //
+       virtual void IAppWidgetViewEventListener_Reserved2(void) {}
+
+       //
+       // This method is for internal use only. Using this method can cause behavioral, security-related,
+       // and consistency-related issues in the application.
+       //
+       // Following method is reserved and may change its name at any time without prior notice.
+       //
+       virtual void IAppWidgetViewEventListener_Reserved3(void) {}
+
+       //
+       // This method is for internal use only. Using this method can cause behavioral, security-related,
+       // and consistency-related issues in the application.
+       //
+       // Following method is reserved and may change its name at any time without prior notice.
+       //
+       virtual void IAppWidgetViewEventListener_Reserved4(void) {}
+
+       //
+       // This method is for internal use only. Using this method can cause behavioral, security-related,
+       // and consistency-related issues in the application.
+       //
+       // Following method is reserved and may change its name at any time without prior notice.
+       //
        virtual void IAppWidgetViewEventListener_Reserved5(void) {}
 };
 
index 54c94f2..37c4ee9 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 #include <new>
-#include <errno.h>\r
+#include <errno.h>
 #include <string.h>
 #include <sys/shm.h>
 #include <X11/Xlib.h>
@@ -261,21 +261,21 @@ _AppWidgetLayer::SyncPixmap(const FloatDimension& size)
 
 #if defined(_BUFFER_TEST)
        {
-               FILE* pFile = null;\r
-               static int idx = 0;\r
-               char filename[1024];\r
-               snprintf(filename, sizeof(filename), "/tmp/provider%d.raw", idx++);\r
-               pFile = fopen(filename, "w+b");\r
-               if (pFile)\r
-               {\r
-                       fwrite(__pRenderBuffer, __bufferSize, 1, pFile);\r
-                       fclose(pFile);\r
-                       SysLog(NID_UI_CTRL, "_BUFFER_TEST: buffer (0x%x) size (%d) pixmapId (%d) width(%f) height(%f)", __pRenderBuffer, __bufferSize, __pixmapId, size.width, size.height);\r
-               }\r
-               else\r
-               {\r
-                       SysLog(NID_UI_CTRL, "File open failed: (%s) buffer (0x%x) size (%d) pixmapId (%d)", strerror(errno), __pRenderBuffer, __bufferSize, __pixmapId);\r
-               }\r
+               FILE* pFile = null;
+               static int idx = 0;
+               char filename[1024];
+               snprintf(filename, sizeof(filename), "/tmp/provider%d.raw", idx++);
+               pFile = fopen(filename, "w+b");
+               if (pFile)
+               {
+                       fwrite(__pRenderBuffer, __bufferSize, 1, pFile);
+                       fclose(pFile);
+                       SysLog(NID_UI_CTRL, "_BUFFER_TEST: buffer (0x%x) size (%d) pixmapId (%d) width(%f) height(%f)", __pRenderBuffer, __bufferSize, __pixmapId, size.width, size.height);
+               }
+               else
+               {
+                       SysLog(NID_UI_CTRL, "File open failed: (%s) buffer (0x%x) size (%d) pixmapId (%d)", strerror(errno), __pRenderBuffer, __bufferSize, __pixmapId);
+               }
        }
 #endif // _BUFFER_TEST
 
index 3a854dc..005656c 100644 (file)
-//\r
-// Open Service Platform\r
-// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.\r
-//\r
-// Licensed under the Flora License, Version 1.0 (the License);\r
-// you may not use this file except in compliance with the License.\r
-// You may obtain a copy of the License at\r
-//\r
-//     http://floralicense.org/license/\r
-//\r
-// Unless required by applicable law or agreed to in writing, software\r
-// distributed under the License is distributed on an "AS IS" BASIS,\r
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-// See the License for the specific language governing permissions and\r
-// limitations under the License.\r
-//\r
-/**\r
- * @file               FShell_AppWidgetPopup.cpp\r
- * @brief              This is the implementation file for the _AppWidgetPopup class.\r
- */\r
-\r
-#include <new>\r
-#include <Evas.h>\r
-#include <Ecore_Evas.h>\r
-#include <provider.h>\r
-#include <provider_buffer.h>\r
-#include <FBaseSysLog.h>\r
-#include <FSysSystemTime.h>\r
-#include <FBase_StringConverter.h>\r
-#include "FUi_UiKeyEvent.h"\r
-#include "FUi_IUiEventManager.h"\r
-#include "FUi_UiEventManager.h"\r
-#include "FUi_ResourceManager.h"\r
-#include "FUiAnim_DisplayManager.h"\r
-#include "FUiAnim_RootVisualElement.h"\r
-#include "FShell_AppWidgetLayer.h"\r
-#include "FShell_AppWidgetPopup.h"\r
-#include "FShell_AppWidgetPopupPresenter.h"\r
-#include "FShell_AppWidgetProviderManagerImpl.h"\r
-\r
-using namespace std;\r
-using namespace Tizen::Base;\r
-using namespace Tizen::Graphics;\r
-using namespace Tizen::System;\r
-using namespace Tizen::Ui;\r
-using namespace Tizen::Ui::Animations;\r
-using namespace Tizen::Ui::Controls;\r
-\r
-namespace Tizen { namespace Shell\r
-{\r
-\r
-class _AppWidgetPopupLayer\r
-       : public _AppWidgetLayer\r
-{\r
-public:\r
-       _AppWidgetPopupLayer(const FloatDimension& size);\r
-       virtual ~_AppWidgetPopupLayer(void);\r
-\r
-private:\r
-       _AppWidgetPopupLayer(const _AppWidgetPopupLayer& rhs);\r
-       _AppWidgetPopupLayer& operator =(const _AppWidgetPopupLayer&  rhs);\r
-\r
-       virtual result RegisterTouchEventListener(void);\r
-       virtual int AcquirePixmap(void);\r
-       virtual result Sync(const FloatDimension& size);\r
-       virtual void ReleasePixmap(void);\r
-};\r
-\r
-_AppWidgetPopupLayer::_AppWidgetPopupLayer(const FloatDimension& size)\r
-       : _AppWidgetLayer(size)\r
-{\r
-}\r
-\r
-_AppWidgetPopupLayer::~_AppWidgetPopupLayer(void)\r
-{\r
-       if (!__isReleased)\r
-       {\r
-               ReleasePixmap();\r
-               __isReleased = true;\r
-       }\r
-}\r
-\r
-result\r
-_AppWidgetPopupLayer::RegisterTouchEventListener(void)\r
-{\r
-       result r = _AppWidgetProviderManagerImpl::GetInstance()->SetAppWidgetPopupEventListener(*this);\r
-       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
-       return r;\r
-}\r
-\r
-int\r
-_AppWidgetPopupLayer::AcquirePixmap(void)\r
-{\r
-       long long ticks = 0;\r
-       SystemTime::GetTicks(ticks);\r
-       SysLog(NID_UI_CTRL, "%lld", ticks);\r
-\r
-       int pixmapId = -1;\r
-\r
-       result r = _AppWidgetProviderManagerImpl::GetInstance()->RequestSharedMemoryIdForPD(GetProviderId(), __size.width, __size.height, pixmapId);\r
-       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
-       SystemTime::GetTicks(ticks);\r
-       SysLog(NID_UI_CTRL, "%lld", ticks);\r
-\r
-       SysLog(NID_UI_CTRL, "pixmapId(%d) size(%f %f)", pixmapId, __size.width, __size.height);\r
-\r
-       return pixmapId;\r
-}\r
-\r
-result\r
-_AppWidgetPopupLayer::Sync(const FloatDimension& size)\r
-{\r
-       result r = _AppWidgetProviderManagerImpl::GetInstance()->RequestSyncSharedMemoryForPD(GetProviderId());\r
-       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
-       return r;\r
-}\r
-\r
-void\r
-_AppWidgetPopupLayer::ReleasePixmap(void)\r
-{\r
-       _AppWidgetProviderManagerImpl::GetInstance()->RequestReleaseSharedMemoryForPD(GetProviderId());\r
-}\r
-\r
-_AppWidgetPopup::_AppWidgetPopup(void)\r
-       : __pAppWidgetPopupPresenter(new (std::nothrow) _AppWidgetPopupPresenter(*this))\r
-       , __pAppWidgetPopupLayer(null)\r
-       , __pAppWidgetPopupRootVisualElement(null)\r
-       , __pEventManager(null)\r
-{\r
-       SysTryReturnVoidResult(NID_UI_CTRL, __pAppWidgetPopupPresenter, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");\r
-\r
-       _UiEventManager* pEventManager = _UiEventManager::GetInstance();\r
-       SysTryReturnVoidResult(NID_UI_CTRL, pEventManager, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");\r
-\r
-       __pEventManager = pEventManager->GetEventManager();\r
-       SysTryReturnVoidResult(NID_UI_CTRL, __pEventManager, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");\r
-}\r
-\r
-_AppWidgetPopup::~_AppWidgetPopup(void)\r
-{\r
-       if (__pEventManager)\r
-       {\r
-               __pEventManager->UnregisterTouchEventHandler(*this);\r
-       }\r
-\r
-       __pAppWidgetPopupLayer = null;\r
-       __pAppWidgetPopupRootVisualElement = null;\r
-}\r
-\r
-_AppWidgetPopup*\r
-_AppWidgetPopup::CreateAppWidgetPopupN(void)\r
-{\r
-       unique_ptr<_AppWidgetPopup> pAppWidgetPopup(new (std::nothrow) _AppWidgetPopup());\r
-       SysTryReturn(NID_UI_CTRL, pAppWidgetPopup, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");\r
-\r
-       result r = GetLastResult();\r
-       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
-       pAppWidgetPopup->AcquireHandle();\r
-\r
-       SetLastResult(E_SUCCESS);\r
-\r
-       return pAppWidgetPopup.release();\r
-}\r
-\r
-result\r
-_AppWidgetPopup::Initialize(const FloatDimension& size)\r
-{\r
-       long long ticks = 0;\r
-       SystemTime::GetTicks(ticks);\r
-\r
-       SysLog(NID_UI_CTRL, "(%d %d) %lld", size.width, size.height, ticks);\r
-\r
-       result r = E_SUCCESS;\r
-\r
-       __appwidgetSize = size;\r
-\r
-       SetSystemWindow(true);\r
-\r
-       r = CreateRootVisualElement();\r
-       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
-       FloatRectangle bounds(0.0f, 0.0f, size.width, size.height);\r
-       r = SetBounds(bounds);\r
-       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
-       r = __pAppWidgetPopupPresenter->Initialize();\r
-       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
-       __pAppWidgetPopupLayer->SetLayerBounds(bounds);\r
-       __pAppWidgetPopupLayer->SetShowState(false);\r
-\r
-       __pAppWidgetPopupRootVisualElement->SetImplicitAnimationEnabled(false);\r
-       __pAppWidgetPopupRootVisualElement->SetName(L"_AppWidgetPopup");\r
-       __pAppWidgetPopupRootVisualElement->SetBounds(bounds);\r
-       __pAppWidgetPopupRootVisualElement->SetShowState(false);\r
-\r
-       SetBackgroundColor(Color(0, 0, 0, 0));\r
-\r
-       __pEventManager->RegisterTouchEventHandler(*this);\r
-       r = GetLastResult();\r
-       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
-       return r;\r
-}\r
-\r
-result\r
-_AppWidgetPopup::SetProviderId(const String& providerId)\r
-{\r
-       __pAppWidgetPopupPresenter->SetProviderId(providerId);\r
-\r
-       result r = __pAppWidgetPopupLayer->SetProviderId(providerId);\r
-       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
-       return r;\r
-}\r
-\r
-String\r
-_AppWidgetPopup::GetProviderId(void) const\r
-{\r
-       return __pAppWidgetPopupPresenter->GetProviderId();\r
-}\r
-\r
-void\r
-_AppWidgetPopup::SetAnchorPosition(const FloatPoint& position)\r
-{\r
-       return __pAppWidgetPopupPresenter->SetAnchorPosition(position);\r
-}\r
-\r
-FloatPoint\r
-_AppWidgetPopup::GetAnchorPosition(void) const\r
-{\r
-       return __pAppWidgetPopupPresenter->GetAnchorPosition();\r
-}\r
-\r
-Canvas*\r
-_AppWidgetPopup::GetClientAreaCanvasN(void) const\r
-{\r
-       Canvas* pCanvas = GetCanvasN(GetClientBoundsF());\r
-       result r = GetLastResult();\r
-       SysTryReturn(NID_UI_CTRL, pCanvas, null, r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
-       return pCanvas;\r
-}\r
-\r
-FloatPoint\r
-_AppWidgetPopup::TranslateToClientAreaPosition(const FloatPoint& controlPosition) const\r
-{\r
-       FloatRectangle leftTop = GetClientBoundsF();\r
-\r
-       return FloatPoint(controlPosition.x - leftTop.x, controlPosition.y - leftTop.y);\r
-}\r
-\r
-FloatPoint\r
-_AppWidgetPopup::TranslateToControlPosition(const FloatPoint& clientPosition) const\r
-{\r
-       FloatRectangle leftTop = GetClientBoundsF();\r
-\r
-       return FloatPoint(clientPosition.x + leftTop.x, clientPosition.y + leftTop.y);\r
-}\r
-\r
-result\r
-_AppWidgetPopup::SetLayerShowState(bool showState)\r
-{\r
-       result r = E_SUCCESS;\r
-\r
-       if (__pAppWidgetPopupRootVisualElement)\r
-       {\r
-               _AppWidgetPopupLayer* pLayer = dynamic_cast<_AppWidgetPopupLayer*>(__pAppWidgetPopupRootVisualElement->GetNativeLayer());\r
-               SysTryReturn(NID_UI_CTRL, pLayer, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.");\r
-\r
-               r = pLayer->SetShowState(showState);\r
-               SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
-               __pAppWidgetPopupRootVisualElement->SetShowState(showState);\r
-       }\r
-\r
-       return r;\r
-}\r
-\r
-result\r
-_AppWidgetPopup::SetLayerBounds(const FloatRectangle& bounds)\r
-{\r
-       result r = E_SUCCESS;\r
-\r
-       if (__pAppWidgetPopupRootVisualElement)\r
-       {\r
-               _AppWidgetPopupLayer* pLayer = dynamic_cast<_AppWidgetPopupLayer*>(__pAppWidgetPopupRootVisualElement->GetNativeLayer());\r
-               r = GetLastResult();\r
-               SysTryReturn(NID_UI_CTRL, pLayer, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
-               pLayer->SetLayerBounds(bounds);\r
-               __pAppWidgetPopupRootVisualElement->SetBounds(bounds);\r
-       }\r
-\r
-       return r;\r
-}\r
-\r
-FloatRectangle\r
-_AppWidgetPopup::GetAppWidgetPopupClientBounds(void) const\r
-{\r
-       int leftMargin = 0;\r
-       int rightMargin = 0;\r
-       int topMargin = 0;\r
-       int bottomMargin = 0;\r
-       _ControlOrientation orientation = GetOrientation();\r
-\r
-       GET_SHAPE_CONFIG(LIVEBOX::POPUP_LEFT_MARGIN, orientation, leftMargin);\r
-       GET_SHAPE_CONFIG(LIVEBOX::POPUP_RIGHT_MARGIN, orientation, rightMargin);\r
-       GET_SHAPE_CONFIG(LIVEBOX::POPUP_TOP_MARGIN, orientation, topMargin);\r
-       GET_SHAPE_CONFIG(LIVEBOX::POPUP_BOTTOM_MARGIN, orientation, bottomMargin);\r
-\r
-       FloatRectangle bounds = GetBoundsF();\r
-\r
-       FloatRectangle clientBounds(bounds.x + leftMargin, bounds.y + topMargin, bounds.width - leftMargin - rightMargin, bounds.height - topMargin - bottomMargin);\r
-\r
-       SysLog(NID_UI_CTRL, "[%d %d %d %d]", clientBounds.x, clientBounds.y, clientBounds.width, clientBounds.height);\r
-\r
-       return clientBounds;\r
-}\r
-\r
-void\r
-_AppWidgetPopup::UpdateClientBounds(const FloatDimension& size, FloatRectangle& clientBounds)\r
-{\r
-       clientBounds = GetAppWidgetPopupClientBounds();\r
-}\r
-\r
-result\r
-_AppWidgetPopup::CreateLayer(void)\r
-{\r
-       unique_ptr<_AppWidgetPopupLayer> pLayer(new (std::nothrow) _AppWidgetPopupLayer(__appwidgetSize));\r
-       SysTryReturn(NID_UI_CTRL, pLayer, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");\r
-\r
-       result r = pLayer->Construct();\r
-       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
-       __pAppWidgetPopupLayer = pLayer.release();\r
-       __pAppWidgetPopupRootVisualElement = __pAppWidgetPopupLayer->GetRootVisualElement();\r
-\r
-       SetLayer(*__pAppWidgetPopupLayer);\r
-       SetRootVisualElement(*__pAppWidgetPopupRootVisualElement);\r
-\r
-       return r;\r
-}\r
-\r
-void\r
-_AppWidgetPopup::OnActivated(void)\r
-{\r
-       result r = SetLayerShowState(true);\r
-       SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));\r
-}\r
-\r
-void\r
-_AppWidgetPopup::OnBoundsChanged(void)\r
-{\r
-       SetLayerBounds(GetBoundsF());\r
-\r
-       SetClientBounds(GetAppWidgetPopupClientBounds());\r
-}\r
-\r
-void\r
-_AppWidgetPopup::OnDraw(void)\r
-{\r
-       if (__pAppWidgetPopupPresenter)\r
-       {\r
-               __pAppWidgetPopupPresenter->Draw();\r
-       }\r
-\r
-       __pAppWidgetPopupLayer->SetRenderEnabled(true);\r
-}\r
-\r
-}} // Tizen::Shell\r
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+/**
+ * @file               FShell_AppWidgetPopup.cpp
+ * @brief              This is the implementation file for the _AppWidgetPopup class.
+ */
+
+#include <new>
+#include <Evas.h>
+#include <Ecore_Evas.h>
+#include <provider.h>
+#include <provider_buffer.h>
+#include <FBaseSysLog.h>
+#include <FSysSystemTime.h>
+#include <FBase_StringConverter.h>
+#include "FUi_UiKeyEvent.h"
+#include "FUi_IUiEventManager.h"
+#include "FUi_UiEventManager.h"
+#include "FUi_ResourceManager.h"
+#include "FUiAnim_DisplayManager.h"
+#include "FUiAnim_RootVisualElement.h"
+#include "FShell_AppWidgetLayer.h"
+#include "FShell_AppWidgetPopup.h"
+#include "FShell_AppWidgetPopupPresenter.h"
+#include "FShell_AppWidgetProviderManagerImpl.h"
+
+using namespace std;
+using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Animations;
+using namespace Tizen::Ui::Controls;
+
+namespace Tizen { namespace Shell
+{
+
+class _AppWidgetPopupLayer
+       : public _AppWidgetLayer
+{
+public:
+       _AppWidgetPopupLayer(const FloatDimension& size);
+       virtual ~_AppWidgetPopupLayer(void);
+
+private:
+       _AppWidgetPopupLayer(const _AppWidgetPopupLayer& rhs);
+       _AppWidgetPopupLayer& operator =(const _AppWidgetPopupLayer&  rhs);
+
+       virtual result RegisterTouchEventListener(void);
+       virtual int AcquirePixmap(void);
+       virtual result Sync(const FloatDimension& size);
+       virtual void ReleasePixmap(void);
+};
+
+_AppWidgetPopupLayer::_AppWidgetPopupLayer(const FloatDimension& size)
+       : _AppWidgetLayer(size)
+{
+}
+
+_AppWidgetPopupLayer::~_AppWidgetPopupLayer(void)
+{
+       if (!__isReleased)
+       {
+               ReleasePixmap();
+               __isReleased = true;
+       }
+}
+
+result
+_AppWidgetPopupLayer::RegisterTouchEventListener(void)
+{
+       result r = _AppWidgetProviderManagerImpl::GetInstance()->SetAppWidgetPopupEventListener(*this);
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       return r;
+}
+
+int
+_AppWidgetPopupLayer::AcquirePixmap(void)
+{
+       long long ticks = 0;
+       SystemTime::GetTicks(ticks);
+       SysLog(NID_UI_CTRL, "%lld", ticks);
+
+       int pixmapId = -1;
+
+       result r = _AppWidgetProviderManagerImpl::GetInstance()->RequestSharedMemoryIdForPD(GetProviderId(), __size.width, __size.height, pixmapId);
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       SystemTime::GetTicks(ticks);
+       SysLog(NID_UI_CTRL, "%lld", ticks);
+
+       SysLog(NID_UI_CTRL, "pixmapId(%d) size(%f %f)", pixmapId, __size.width, __size.height);
+
+       return pixmapId;
+}
+
+result
+_AppWidgetPopupLayer::Sync(const FloatDimension& size)
+{
+       result r = _AppWidgetProviderManagerImpl::GetInstance()->RequestSyncSharedMemoryForPD(GetProviderId());
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       return r;
+}
+
+void
+_AppWidgetPopupLayer::ReleasePixmap(void)
+{
+       _AppWidgetProviderManagerImpl::GetInstance()->RequestReleaseSharedMemoryForPD(GetProviderId());
+}
+
+_AppWidgetPopup::_AppWidgetPopup(void)
+       : __pAppWidgetPopupPresenter(new (std::nothrow) _AppWidgetPopupPresenter(*this))
+       , __pAppWidgetPopupLayer(null)
+       , __pAppWidgetPopupRootVisualElement(null)
+       , __pEventManager(null)
+{
+       SysTryReturnVoidResult(NID_UI_CTRL, __pAppWidgetPopupPresenter, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+
+       _UiEventManager* pEventManager = _UiEventManager::GetInstance();
+       SysTryReturnVoidResult(NID_UI_CTRL, pEventManager, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+
+       __pEventManager = pEventManager->GetEventManager();
+       SysTryReturnVoidResult(NID_UI_CTRL, __pEventManager, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+}
+
+_AppWidgetPopup::~_AppWidgetPopup(void)
+{
+       if (__pEventManager)
+       {
+               __pEventManager->UnregisterTouchEventHandler(*this);
+       }
+
+       __pAppWidgetPopupLayer = null;
+       __pAppWidgetPopupRootVisualElement = null;
+}
+
+_AppWidgetPopup*
+_AppWidgetPopup::CreateAppWidgetPopupN(void)
+{
+       unique_ptr<_AppWidgetPopup> pAppWidgetPopup(new (std::nothrow) _AppWidgetPopup());
+       SysTryReturn(NID_UI_CTRL, pAppWidgetPopup, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+
+       result r = GetLastResult();
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       pAppWidgetPopup->AcquireHandle();
+
+       SetLastResult(E_SUCCESS);
+
+       return pAppWidgetPopup.release();
+}
+
+result
+_AppWidgetPopup::Initialize(const FloatDimension& size)
+{
+       long long ticks = 0;
+       SystemTime::GetTicks(ticks);
+
+       SysLog(NID_UI_CTRL, "(%d %d) %lld", size.width, size.height, ticks);
+
+       result r = E_SUCCESS;
+
+       __appwidgetSize = size;
+
+       SetSystemWindow(true);
+
+       r = CreateRootVisualElement();
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       FloatRectangle bounds(0.0f, 0.0f, size.width, size.height);
+       r = SetBounds(bounds);
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       r = __pAppWidgetPopupPresenter->Initialize();
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       __pAppWidgetPopupLayer->SetLayerBounds(bounds);
+       __pAppWidgetPopupLayer->SetShowState(false);
+
+       __pAppWidgetPopupRootVisualElement->SetImplicitAnimationEnabled(false);
+       __pAppWidgetPopupRootVisualElement->SetName(L"_AppWidgetPopup");
+       __pAppWidgetPopupRootVisualElement->SetBounds(bounds);
+       __pAppWidgetPopupRootVisualElement->SetShowState(false);
+
+       SetBackgroundColor(Color(0, 0, 0, 0));
+
+       __pEventManager->RegisterTouchEventHandler(*this);
+       r = GetLastResult();
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       return r;
+}
+
+result
+_AppWidgetPopup::SetProviderId(const String& providerId)
+{
+       __pAppWidgetPopupPresenter->SetProviderId(providerId);
+
+       result r = __pAppWidgetPopupLayer->SetProviderId(providerId);
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       return r;
+}
+
+String
+_AppWidgetPopup::GetProviderId(void) const
+{
+       return __pAppWidgetPopupPresenter->GetProviderId();
+}
+
+void
+_AppWidgetPopup::SetAnchorPosition(const FloatPoint& position)
+{
+       return __pAppWidgetPopupPresenter->SetAnchorPosition(position);
+}
+
+FloatPoint
+_AppWidgetPopup::GetAnchorPosition(void) const
+{
+       return __pAppWidgetPopupPresenter->GetAnchorPosition();
+}
+
+Canvas*
+_AppWidgetPopup::GetClientAreaCanvasN(void) const
+{
+       Canvas* pCanvas = GetCanvasN(GetClientBoundsF());
+       result r = GetLastResult();
+       SysTryReturn(NID_UI_CTRL, pCanvas, null, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       return pCanvas;
+}
+
+FloatPoint
+_AppWidgetPopup::TranslateToClientAreaPosition(const FloatPoint& controlPosition) const
+{
+       FloatRectangle leftTop = GetClientBoundsF();
+
+       return FloatPoint(controlPosition.x - leftTop.x, controlPosition.y - leftTop.y);
+}
+
+FloatPoint
+_AppWidgetPopup::TranslateToControlPosition(const FloatPoint& clientPosition) const
+{
+       FloatRectangle leftTop = GetClientBoundsF();
+
+       return FloatPoint(clientPosition.x + leftTop.x, clientPosition.y + leftTop.y);
+}
+
+result
+_AppWidgetPopup::SetLayerShowState(bool showState)
+{
+       result r = E_SUCCESS;
+
+       if (__pAppWidgetPopupRootVisualElement)
+       {
+               _AppWidgetPopupLayer* pLayer = dynamic_cast<_AppWidgetPopupLayer*>(__pAppWidgetPopupRootVisualElement->GetNativeLayer());
+               SysTryReturn(NID_UI_CTRL, pLayer, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+
+               r = pLayer->SetShowState(showState);
+               SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+               __pAppWidgetPopupRootVisualElement->SetShowState(showState);
+       }
+
+       return r;
+}
+
+result
+_AppWidgetPopup::SetLayerBounds(const FloatRectangle& bounds)
+{
+       result r = E_SUCCESS;
+
+       if (__pAppWidgetPopupRootVisualElement)
+       {
+               _AppWidgetPopupLayer* pLayer = dynamic_cast<_AppWidgetPopupLayer*>(__pAppWidgetPopupRootVisualElement->GetNativeLayer());
+               r = GetLastResult();
+               SysTryReturn(NID_UI_CTRL, pLayer, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+               pLayer->SetLayerBounds(bounds);
+               __pAppWidgetPopupRootVisualElement->SetBounds(bounds);
+       }
+
+       return r;
+}
+
+FloatRectangle
+_AppWidgetPopup::GetAppWidgetPopupClientBounds(void) const
+{
+       int leftMargin = 0;
+       int rightMargin = 0;
+       int topMargin = 0;
+       int bottomMargin = 0;
+       _ControlOrientation orientation = GetOrientation();
+
+       GET_SHAPE_CONFIG(LIVEBOX::POPUP_LEFT_MARGIN, orientation, leftMargin);
+       GET_SHAPE_CONFIG(LIVEBOX::POPUP_RIGHT_MARGIN, orientation, rightMargin);
+       GET_SHAPE_CONFIG(LIVEBOX::POPUP_TOP_MARGIN, orientation, topMargin);
+       GET_SHAPE_CONFIG(LIVEBOX::POPUP_BOTTOM_MARGIN, orientation, bottomMargin);
+
+       FloatRectangle bounds = GetBoundsF();
+
+       FloatRectangle clientBounds(bounds.x + leftMargin, bounds.y + topMargin, bounds.width - leftMargin - rightMargin, bounds.height - topMargin - bottomMargin);
+
+       SysLog(NID_UI_CTRL, "[%d %d %d %d]", clientBounds.x, clientBounds.y, clientBounds.width, clientBounds.height);
+
+       return clientBounds;
+}
+
+void
+_AppWidgetPopup::UpdateClientBounds(const FloatDimension& size, FloatRectangle& clientBounds)
+{
+       clientBounds = GetAppWidgetPopupClientBounds();
+}
+
+result
+_AppWidgetPopup::CreateLayer(void)
+{
+       unique_ptr<_AppWidgetPopupLayer> pLayer(new (std::nothrow) _AppWidgetPopupLayer(__appwidgetSize));
+       SysTryReturn(NID_UI_CTRL, pLayer, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+
+       result r = pLayer->Construct();
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       __pAppWidgetPopupLayer = pLayer.release();
+       __pAppWidgetPopupRootVisualElement = __pAppWidgetPopupLayer->GetRootVisualElement();
+
+       SetLayer(*__pAppWidgetPopupLayer);
+       SetRootVisualElement(*__pAppWidgetPopupRootVisualElement);
+
+       return r;
+}
+
+void
+_AppWidgetPopup::OnActivated(void)
+{
+       result r = SetLayerShowState(true);
+       SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+}
+
+void
+_AppWidgetPopup::OnBoundsChanged(void)
+{
+       SetLayerBounds(GetBoundsF());
+
+       SetClientBounds(GetAppWidgetPopupClientBounds());
+}
+
+void
+_AppWidgetPopup::OnDraw(void)
+{
+       if (__pAppWidgetPopupPresenter)
+       {
+               __pAppWidgetPopupPresenter->Draw();
+       }
+
+       __pAppWidgetPopupLayer->SetRenderEnabled(true);
+}
+
+}} // Tizen::Shell
index 8407259..9b7f64c 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 #include <new>
-#include <errno.h>\r
+#include <errno.h>
 #include <string.h>
 #include <livebox.h>
 #include <livebox-service.h>
index b22b441..1d85662 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 #include <new>
-#include <errno.h>\r
+#include <errno.h>
 #include <string.h>
 #include <Ecore_X.h>
 #include <Evas.h>
@@ -581,21 +581,21 @@ _AppWidgetViewManager::GetBitmapN(void* pBuffer, const FloatDimension& size) con
 
 #if defined(_BUFFER_TEST)
        {
-               FILE* pFile = null;\r
-               static int idx = 0;\r
-               char filename[1024];\r
-               snprintf(filename, sizeof(filename), "/tmp/view%d.raw", idx++);\r
-               pFile = fopen(filename, "w+b");\r
-               if (pFile)\r
-               {\r
-                       fwrite(pBuffer, length, 1, pFile);\r
-                       fclose(pFile);\r
-                       SysLog(NID_UI_CTRL, "_BUFFER_TEST: buffer (0x%x) size (%d) width(%f) height(%f)", pBuffer, length, size.width, size.height);\r
-               }\r
-               else\r
-               {\r
-                       SysLog(NID_UI_CTRL, "File open failed: (%s) buffer (0x%x) size (%d)", strerror(errno), pBuffer, length);\r
-               }\r
+               FILE* pFile = null;
+               static int idx = 0;
+               char filename[1024];
+               snprintf(filename, sizeof(filename), "/tmp/view%d.raw", idx++);
+               pFile = fopen(filename, "w+b");
+               if (pFile)
+               {
+                       fwrite(pBuffer, length, 1, pFile);
+                       fclose(pFile);
+                       SysLog(NID_UI_CTRL, "_BUFFER_TEST: buffer (0x%x) size (%d) width(%f) height(%f)", pBuffer, length, size.width, size.height);
+               }
+               else
+               {
+                       SysLog(NID_UI_CTRL, "File open failed: (%s) buffer (0x%x) size (%d)", strerror(errno), pBuffer, length);
+               }
        }
 #endif // _BUFFER_TEST
 
index f5b856e..c2d807f 100644 (file)
@@ -44,21 +44,21 @@ class _OSP_EXPORT_ _IAppWidgetViewEventListener
        : public Tizen::Base::Runtime::IEventListener
 {
 public:
-       /*\r
-        * This polymorphic destructor should be overridden if required.\r
-        * This way, the destructors of the derived classes are called when the destructor of this interface is called.\r
-        *\r
-        * @since       2.1\r
+       /*
+        * This polymorphic destructor should be overridden if required.
+        * This way, the destructors of the derived classes are called when the destructor of this interface is called.
+        *
+        * @since       2.1
         */
        virtual ~_IAppWidgetViewEventListener(void) {}
 
-       /*\r
+       /*
         * Called when a AppWidgetProvider instance is about to be removed. @n
-        *\r
-        * @since 2.1\r
-        *\r
+        *
+        * @since 2.1
+        *
         * @param[in]  appwidgetView    The source of the event
-        */\r
+        */
        virtual void OnAppWidgetProviderRemoved(_AppWidgetView& appwidgetView) = 0;
 };