#include <FShellNotificationRequest.h>
#include <FShellIBadgeEventListener.h>
#include <FShellQuickPanelFrame.h>
-#include <FShellLiveboxView.h>
-#include <FShellLiveboxManager.h>
-#include <FShellLiveboxProviderInfo.h>
-#include <FShellLiveboxSizeInfo.h>
-#include <FShellLiveboxProvider.h>
-#include <FShellILiveboxProviderFactory.h>
-#include <FShellLiveboxPopupProvider.h>
-#include <FShellILiveboxPopupProviderFactory.h>
-#include <FShellLiveboxProviderManager.h>
-#include <FShellLiveboxFrame.h>
-#include <FShellLiveboxPopup.h>
-#include <FShellILiveboxAddRequestListener.h>
+#include <FShellAppWidgetView.h>
+#include <FShellAppWidgetManager.h>
+#include <FShellAppWidgetProviderInfo.h>
+#include <FShellAppWidgetSizeInfo.h>
+#include <FShellAppWidgetProvider.h>
+#include <FShellIAppWidgetProviderFactory.h>
+#include <FShellAppWidgetPopupProvider.h>
+#include <FShellIAppWidgetPopupProviderFactory.h>
+#include <FShellAppWidgetProviderManager.h>
+#include <FShellAppWidgetFrame.h>
+#include <FShellAppWidgetPopup.h>
+#include <FShellIAppWidgetAddRequestListener.h>
#include <FShellShortcutManager.h>
#include <FShellIShortcutRequestListener.h>
#include <FShellLockManager.h>
* @remarks @b Header @b %file: @b \#include @b <FShell.h> @n
* @b Library : @b osp-shell
*
- * The %Shell namespace contains the classes for phone shell management, including posting notifications, handling shortcuts, and using livebox.
+ * The %Shell namespace contains the classes for phone shell management, including posting notifications, handling shortcuts, and using appwidget.
* @n@n
* For more information on the %Shell namespace features, see <a href="../org.tizen.native.appprogramming/html/guide/shell/shell_namespace.htm">Shell Guide</a>.
*
//
/**
- * @file FShellLiveboxFrame.h
- * @brief This is the header file for the %LiveboxFrame class.
+ * @file FShellAppWidgetFrame.h
+ * @brief This is the header file for the %AppWidgetFrame class.
*
- * This header file contains the declarations of the %LiveboxFrame class.
+ * This header file contains the declarations of the %AppWidgetFrame class.
*/
-#ifndef _FSHELL_LIVEBOX_FRAME_H_
-#define _FSHELL_LIVEBOX_FRAME_H_
+#ifndef _FSHELL_APPWIDGET_FRAME_H_
+#define _FSHELL_APPWIDGET_FRAME_H_
#include <FUiWindow.h>
{
/**
- * @class LiveboxFrame
- * @brief This class provides the main frame window for a LiveboxProvider.
+ * @class AppWidgetFrame
+ * @brief This class provides the main frame window for a AppWidgetProvider.
* @since 2.1
*
- * The %LiveboxFrame is the root parent of all Livebox controls that are created by a LiveboxProvider.
+ * The %AppWidgetFrame is the root parent of all AppWidget controls that are created by a AppWidgetProvider.
*
*/
-class _OSP_EXPORT_ LiveboxFrame
+class _OSP_EXPORT_ AppWidgetFrame
: public Tizen::Ui::Window
{
public:
*
* @since 2.1
*/
- LiveboxFrame(void);
+ AppWidgetFrame(void);
/**
* This destructor overrides Tizen::Base::Object::~Object().
*
* @since 2.1
*/
- virtual ~LiveboxFrame(void);
+ virtual ~AppWidgetFrame(void);
/**
- * Initializes this instance of %LiveboxFrame with the specified parameter.
+ * Initializes this instance of %AppWidgetFrame with the specified parameter.
*
* @since 2.1
* @return An error code
* @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.
- * @see LiveboxProvider::OnLiveboxProviderInitialize()
+ * @see AppWidgetProvider::OnAppWidgetProviderInitialize()
*/
result Construct(const Tizen::Graphics::FloatDimension& size);
/**
- * Initializes this instance of %LiveboxFrame with the specified parameter.
+ * Initializes this instance of %AppWidgetFrame with the specified parameter.
*
* @since 2.1
* @return An error code
* @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.
- * @see LiveboxProvider::OnLiveboxProviderInitialize()
+ * @see AppWidgetProvider::OnAppWidgetProviderInitialize()
*/
result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatDimension& size);
//
// Following method is reserved and may change its name at any time without prior notice.
//
- virtual void LiveboxFrame_Reserved1(void) {}
+ virtual void AppWidgetFrame_Reserved1(void) {}
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
//
// Following method is reserved and may change its name at any time without prior notice.
//
- virtual void LiveboxFrame_Reserved2(void) {}
+ virtual void AppWidgetFrame_Reserved2(void) {}
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
//
// Following method is reserved and may change its name at any time without prior notice.
//
- virtual void LiveboxFrame_Reserved3(void) {}
+ virtual void AppWidgetFrame_Reserved3(void) {}
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
//
// Following method is reserved and may change its name at any time without prior notice.
//
- virtual void LiveboxFrame_Reserved4(void) {}
+ virtual void AppWidgetFrame_Reserved4(void) {}
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
//
// Following method is reserved and may change its name at any time without prior notice.
//
- virtual void LiveboxFrame_Reserved5(void) {}
+ virtual void AppWidgetFrame_Reserved5(void) {}
private:
//
// The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
//
- LiveboxFrame(const LiveboxFrame& rhs);
+ AppWidgetFrame(const AppWidgetFrame& rhs);
//
// The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
//
- LiveboxFrame& operator =(const LiveboxFrame& rhs);
-}; // LiveboxFrame
+ AppWidgetFrame& operator =(const AppWidgetFrame& rhs);
+}; // AppWidgetFrame
}} // Tizen::Shell
-#endif // _FSHELL_LIVEBOX_FRAME_H_
+#endif // _FSHELL_APPWIDGET_FRAME_H_
//
/**
- * @file FShellLiveboxManager.h
- * @brief This is the header file for the %LiveboxManager class.
+ * @file FShellAppWidgetManager.h
+ * @brief This is the header file for the %AppWidgetManager class.
*
- * This header file contains the declarations of the %LiveboxManager class.
+ * This header file contains the declarations of the %AppWidgetManager class.
*/
-#ifndef _FSHELL_LIVEBOX_MANAGER_H_
-#define _FSHELL_LIVEBOX_MANAGER_H_
+#ifndef _FSHELL_APPWIDGET_MANAGER_H_
+#define _FSHELL_APPWIDGET_MANAGER_H_
#include <unique_ptr.h>
#include <FBaseString.h>
namespace Tizen { namespace Shell
{
-class LiveboxProviderInfo;
-class ILiveboxAddRequestListener;
+class AppWidgetProviderInfo;
+class IAppWidgetAddRequestListener;
/**
- * @class LiveboxManager
- * @brief Manages static information of all the Liveboxes and provides APIs for Livebox viewer(Such as the Home screen).
+ * @class AppWidgetManager
+ * @brief Manages static information of all the AppWidgetes and provides APIs for AppWidget viewer(Such as the Home screen).
*
* @since 2.1
*
* @final This class is not intended for extension.
*
- * The %LiveboxManager class manages static information of all the Liveboxes and deliveries request to add Livebox.
+ * The %AppWidgetManager class manages static information of all the AppWidgetes and deliveries request to add AppWidget.
*/
-class _OSP_EXPORT_ LiveboxManager
+class _OSP_EXPORT_ AppWidgetManager
: public Tizen::Base::Object
{
public:
/**
- * Gets the Livebox manager instance.
+ * Gets the AppWidget manager instance.
*
* @since 2.1
*
- * @return A pointer to the %LiveboxManager instance, @n
+ * @return A pointer to the %AppWidgetManager instance, @n
* else @c null if it fails
*/
- static LiveboxManager* GetInstance(void);
+ static AppWidgetManager* GetInstance(void);
/**
- * Gets a list of installed LiveboxProviderInfo
+ * Gets a list of installed AppWidgetProviderInfo
*
* @since 2.1
*
- * @return A pointer to the array list that contains all LiveboxProviderInfo of installed LiveboxProvider@n
+ * @return A pointer to the array list that contains all AppWidgetProviderInfo of installed AppWidgetProvider@n
* else @c null if an error occurs
*
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
- Tizen::Base::Collection::IList* GetLiveboxProviderInfoListN(void);
+ Tizen::Base::Collection::IList* GetAppWidgetProviderInfoListN(void) const;
/**
- * Gets a LiveboxProviderInfo of the specified Livebox provider.
+ * Gets a AppWidgetProviderInfo of the specified AppWidget provider.
*
* @since 2.1
*
- * @param[in] appId The Id of the application that provides Livebox
- * @param[in] providerName The name of the Livebox provider
- * @return A pointer to the LiveboxProviderInfo of the specified LiveboxProvider@n
+ * @param[in] appId The Id of the application that provides AppWidget
+ * @param[in] providerName The name of the AppWidget provider
+ * @return A pointer to the AppWidgetProviderInfo of the specified AppWidgetProvider@n
* else @c null if an error occurs
*
* @exception E_SUCCESS The method is successful.
* @exception E_APP_NOT_INSTALLED The application is not installed.
- * @exception E_OBJ_NOT_FOUND The specified Livebox provider is not found.
+ * @exception E_OBJ_NOT_FOUND The specified AppWidget provider is not found.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
- LiveboxProviderInfo* GetLiveboxProviderInfoN(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName);
+ AppWidgetProviderInfo* GetAppWidgetProviderInfoN(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName) const;
/**
- * Gets the LiveboxProviderInfo of default Livebox provider in the package.
+ * Gets the AppWidgetProviderInfo of default AppWidget provider in the package.
*
* @since 2.1
*
- * @param[in] packageId The Id of the packageId that contains Livebox provider
- * @return A pointer to the LiveboxProviderInfo of the default LiveboxProvider@n
- * else @c null if there is no default Livebox provider or an error occurs
+ * @param[in] packageId The Id of the packageId that contains AppWidget provider
+ * @return A pointer to the AppWidgetProviderInfo of the default AppWidgetProvider@n
+ * else @c null if there is no default AppWidget provider or an error occurs
*
* @exception E_SUCCESS The method is successful.
* @exception E_APP_NOT_INSTALLED The application is not installed.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
- LiveboxProviderInfo* GetDefaultLiveboxProviderInfoN(const Tizen::App::PackageId& packageId);
+ AppWidgetProviderInfo* GetDefaultAppWidgetProviderInfoN(const Tizen::App::PackageId& packageId) const;
/**
- * Sets a Livebox request listener. @n
+ * Sets a AppWidget request listener. @n
* The listener gets notified when the request is recieved. @n
* To unset the listener, pass a @c null value to the pListener parameter.
*
* @since 2.1
*
* @return An error code
- * @param[in] pListener The pointer to the listener to receive request to add Livebox
+ * @param[in] pListener The pointer to the listener to receive request to add AppWidget
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
*
- * @see ILiveboxAddRequestListener
+ * @see IAppWidgetAddRequestListener
* @remarks Platform does not have the ownership of this pointer, So caller should manage the listener object properly.
*/
- result SetLiveboxAddRequestListener(ILiveboxAddRequestListener* pListener);
+ result SetAppWidgetAddRequestListener(IAppWidgetAddRequestListener* pListener);
private:
//
//
// @since 2.1
//
- LiveboxManager(void);
+ AppWidgetManager(void);
//
// This destructor is intentionally declared as private to implement the %Singleton semantic.
//
// @since 2.1
//
- virtual ~LiveboxManager(void);
+ virtual ~AppWidgetManager(void);
//
// The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
//
// @since 2.1
//
- LiveboxManager(const LiveboxManager& rhs);
+ AppWidgetManager(const AppWidgetManager& rhs);
//
// The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
//
// @since 2.1
//
- LiveboxManager& operator =(const LiveboxManager& rhs);
+ AppWidgetManager& operator =(const AppWidgetManager& rhs);
//
// Constructs the instance of this class.
//
result Construct(void);
- static void InitSingleton(void);\r
- static void DestroySingleton(void);\r
-\r
+ static void InitSingleton(void);
+ static void DestroySingleton(void);
+
private:
- static LiveboxManager* __pTheInstance;\r
- class _LiveboxManagerImpl* __pLiveboxManagerImpl;
- friend struct std::default_delete< LiveboxManager >;
+ static AppWidgetManager* __pTheInstance;
+ class _AppWidgetManagerImpl* __pAppWidgetManagerImpl;
+ friend struct std::default_delete< AppWidgetManager >;
};
}} // Tizen::Shell
-#endif /* _FSHELL_LIVEBOX_MANAGER_H_ */
+#endif /* _FSHELL_APPWIDGET_MANAGER_H_ */
//
/**
- * @file FShellLiveboxPopup.h
- * @brief This is the header file for the %LiveboxPopup class.
+ * @file FShellAppWidgetPopup.h
+ * @brief This is the header file for the %AppWidgetPopup class.
*
- * This header file contains the declarations of the %LiveboxPopup class.
+ * This header file contains the declarations of the %AppWidgetPopup class.
*/
-#ifndef _FSHELL_LIVEBOX_POPUP_H_
-#define _FSHELL_LIVEBOX_POPUP_H_
+#ifndef _FSHELL_APPWIDGET_POPUP_H_
+#define _FSHELL_APPWIDGET_POPUP_H_
#include <FUiWindow.h>
{
/**
- * @class LiveboxPopup
- * @brief This class provides the popup for a LiveboxProvider.
+ * @class AppWidgetPopup
+ * @brief This class provides the popup for a AppWidgetProvider.
* @since 2.1
*
- * The %LiveboxPopup supports detailed screen for a LiveboxProvider.
+ * The %AppWidgetPopup supports detailed screen for a AppWidgetProvider.
*
*/
-class _OSP_EXPORT_ LiveboxPopup
+class _OSP_EXPORT_ AppWidgetPopup
: public Tizen::Ui::Window
{
public:
*
* @since 2.1
*/
- LiveboxPopup(void);
+ AppWidgetPopup(void);
/**
* This destructor overrides Tizen::Base::Object::~Object().
*
* @since 2.1
*/
- virtual ~LiveboxPopup(void);
+ virtual ~AppWidgetPopup(void);
/**
- * Initializes this instance of %LiveboxFrame with the specified parameter.
+ * Initializes this instance of %AppWidgetFrame with the specified parameter.
*
* @since 2.1
* @return An error code
* @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.
- * @see LiveboxProvider::OnLiveboxPopupProviderInitialize()
+ * @see AppWidgetProvider::OnAppWidgetPopupProviderInitialize()
*/
result Construct(const Tizen::Graphics::FloatDimension& size);
/**
- * Initializes this instance of %LiveboxFrame with the specified parameter.
+ * Initializes this instance of %AppWidgetFrame with the specified parameter.
*
* @since 2.1
* @return An error code
* @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.
- * @see LiveboxProvider::OnLiveboxPopupProviderInitialize()
+ * @see AppWidgetProvider::OnAppWidgetPopupProviderInitialize()
*/
result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatDimension& size);
-\r
- /**\r
- * Gets the bounds of the client area.\r
- *\r
- * @since 2.1\r
- *\r
- * @return The bounds of the client area in a FloatRectangle instance\r
- */\r
+
+ /**
+ * Gets the bounds of the client area.
+ *
+ * @since 2.1
+ *
+ * @return The bounds of the client area in a FloatRectangle instance
+ */
Tizen::Graphics::FloatRectangle GetClientAreaBounds(void) const;
-\r
- /**\r
- * Creates and returns a graphics canvas whose bounds (position and size) are equal to the bounds of the client area of the %LiveboxPopup.\r
- *\r
- * @since 2.1\r
- *\r
- * @return The graphic canvas of the %LiveboxPopup, @n\r
- * else @c null if an error occurs\r
- * @exception E_SUCCESS The method is successful.\r
- * @exception E_RESOURCE_UNAVAILABLE The required resource is currently unavailable.\r
- * @remarks The method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the client area of the % LiveboxPopup. @n\r
- * It is the responsibility of the developers to deallocate the canvas after use.\r
- * @remarks The canvas is valid only if the properties of the parent control of the canvas remain unchanged. @n\r
+
+ /**
+ * Creates and returns a graphics canvas whose bounds (position and size) are equal to the bounds of the client area of the %AppWidgetPopup.
+ *
+ * @since 2.1
+ *
+ * @return The graphic canvas of the %AppWidgetPopup, @n
+ * else @c null if an error occurs
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_RESOURCE_UNAVAILABLE The required resource is currently unavailable.
+ * @remarks The method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the client area of the % AppWidgetPopup. @n
+ * It is the responsibility of the developers to deallocate the canvas after use.
+ * @remarks The canvas is valid only if the properties of the parent control of the canvas remain unchanged. @n
* Therefore, delete the previously allocated canvas and create a new canvas using the GetClientAreaCanvasN() method if the size or position of the
- * control is changed.\r
- * @remarks The specific error code can be accessed using the GetLastResult() method.\r
- */\r
- Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const;\r
-\r
- /**\r
- * Translates the specified position to the client coordinates.\r
- *\r
- * @since 2.1\r
- *\r
- * @return The float position in relative to the top-left corner of the client-area, @n\r
- * else @c (-1.0f,-1.0f) if the instance is invalid\r
- * @param[in] controlPosition The float position relative to the top-left corner of the %LiveboxPopup.
+ * control is changed.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
+ */
+ Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const;
+
+ /**
+ * Translates the specified position to the client coordinates.
+ *
+ * @since 2.1
+ *
+ * @return The float position in relative to the top-left corner of the client-area, @n
+ * else @c (-1.0f,-1.0f) if the instance is invalid
+ * @param[in] controlPosition The float position relative to the top-left corner of the %AppWidgetPopup.
* @see TranslateToControlPosition()
- */\r
+ */
Tizen::Graphics::FloatPoint TranslateToClientAreaPosition(const Tizen::Graphics::FloatPoint& controlPosition) const;
-\r
- /**\r
- * Translates the specified client position to the control coordinate.\r
- *\r
- * @since 2.1\r
- *\r
- * @return The float position in relative to the top-left corner of the %Popup control, @n\r
- * else @c (-1.0f,-1.0f) if the instance is invalid\r
- * @param[in] clientPosition The float position relative to the top-left corner of the client area\r
+
+ /**
+ * Translates the specified client position to the control coordinate.
+ *
+ * @since 2.1
+ *
+ * @return The float position in relative to the top-left corner of the %Popup control, @n
+ * else @c (-1.0f,-1.0f) if the instance is invalid
+ * @param[in] clientPosition The float position relative to the top-left corner of the client area
* @see TranslateToClientAreaPosition()
- */\r
+ */
Tizen::Graphics::FloatPoint TranslateToControlPosition(const Tizen::Graphics::FloatPoint& clientPosition) const;
protected:
//
// Following method is reserved and may change its name at any time without prior notice.
//
- virtual void LiveboxPopup_Reserved1(void) {}
+ virtual void AppWidgetPopup_Reserved1(void) {}
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
//
// Following method is reserved and may change its name at any time without prior notice.
//
- virtual void LiveboxPopup_Reserved2(void) {}
+ virtual void AppWidgetPopup_Reserved2(void) {}
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
//
// Following method is reserved and may change its name at any time without prior notice.
//
- virtual void LiveboxPopup_Reserved3(void) {}
+ virtual void AppWidgetPopup_Reserved3(void) {}
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
//
// Following method is reserved and may change its name at any time without prior notice.
//
- virtual void LiveboxPopup_Reserved4(void) {}
+ virtual void AppWidgetPopup_Reserved4(void) {}
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
//
// Following method is reserved and may change its name at any time without prior notice.
//
- virtual void LiveboxPopup_Reserved5(void) {}
+ virtual void AppWidgetPopup_Reserved5(void) {}
private:
//
// The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
//
- LiveboxPopup(const LiveboxPopup& rhs);
+ AppWidgetPopup(const AppWidgetPopup& rhs);
//
// The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
//
- LiveboxPopup& operator =(const LiveboxPopup& rhs);
-}; // LiveboxPopup
+ AppWidgetPopup& operator =(const AppWidgetPopup& rhs);
+}; // AppWidgetPopup
}} // Tizen::Shell
-#endif // _FSHELL_LIVEBOX_POPUP_H_
+#endif // _FSHELL_APPWIDGET_POPUP_H_
--- /dev/null
+//
+// 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 FShellAppWidgetPopupProvider.h
+ * @brief This is the header file for the AppWidgetPopupProvider class.
+ *
+ * This header file contains the declarations of the %AppWidgetPopupProvider class.
+ */
+
+#ifndef _FSHELL_APPWIDGET_POPUP_PROVIDER_H_
+#define _FSHELL_APPWIDGET_POPUP_PROVIDER_H_
+
+#include <FBaseObject.h>
+
+namespace Tizen { namespace Shell
+{
+
+class AppWidgetPopup;
+
+/**
+ * @class AppWidgetPopupProvider
+ * @brief This class is the abstract base class of all AppWidget popup provider
+ *
+ * @since 2.1
+ *
+ * The %AppWidgetPopupProvider class is a base class which represents a AppWidget popup provider
+ */
+class _OSP_EXPORT_ AppWidgetPopupProvider
+ : public Tizen::Base::Object
+{
+protected:
+ /**
+ * This is the default constructor for this class.
+ *
+ * @since 2.1
+ */
+ AppWidgetPopupProvider(void);
+
+ /**
+ * This destructor overrides Tizen::Base::Object::~Object().
+ *
+ * @since 2.1
+ */
+ virtual ~AppWidgetPopupProvider(void);
+
+ /**
+ * Called when the AppWidget popup provider is required to be created @n
+ *
+ * @since 2.1
+ *
+ * @param[in] userInfo User information that specifed when the AppWidget is added
+ * @return @c true if the method is successful, @n
+ * else @c false
+ *
+ * @remarks AppWidgetPopup should be created and set here
+ * @see SetAppWidgetPopup
+ */
+ virtual bool OnAppWidgetPopupProviderInitializing(const Tizen::Base::String& userInfo) = 0;
+
+ /**
+ * Called when the AppWidget popup provider is required to be destroyed @n
+ *
+ * @since 2.1
+ */
+ virtual void OnAppWidgetPopupProviderTerminating(void) = 0;
+
+ /**
+ * Sets the AppWidget popup to the AppWidget popup provider
+ *
+ * @since 2.1
+ *
+ * @return An error code
+ * @param[in] pAppWidgetPopup The pointer to AppWidgetPopup instance to be set to the AppWidget
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The pointer to the AppWidgetFrame is null, or not constructed yet.
+ * @exception E_SYSTEM The method cannot proceed due to a severe system error.
+ *
+ * @remarks This function should be called only in OnAppWidgetPopupProviderInitializing.
+ * @remarks AppWidgetPopup instance ownership is transferred to platform. After AppWidgetPopupProvider::OnAppWidgetPopupProviderTerminating() is called, AppWidgetPopup instance is removed automatically. AppWidgetPopup instance reuse is not allowed.
+ */
+ result SetAppWidgetPopup(Tizen::Shell::AppWidgetPopup* pAppWidgetPopup);
+
+ /**
+ * Gets the AppWidget popup
+ *
+ * @since 2.1
+ *
+ * @return The AppWidgetPopup instnace, or null if any AppWidgetPopup is set yet.
+ */
+ Tizen::Shell::AppWidgetPopup* GetAppWidgetPopup(void);
+
+ /**
+ * Gets the AppWidget popup from the AppWidget
+ *
+ * @since 2.1
+ *
+ * @return The AppWidgetPopup instnace, or null if any AppWidgetPopup is set yet.
+ */
+ const Tizen::Shell::AppWidgetPopup* GetAppWidgetPopup(void) const;
+
+ /**
+ * Requests AppWidget service to trigger specified AppWidget update
+ *
+ * @since 2.1
+ *
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM The method cannot proceed due to a severe system error.
+ */
+ result RequestUpdateToAppWidget(void);
+
+protected:
+ //
+ // This method is for internal use only. Using this method can cause behavioral,
+ // security-related, and consistency-related issues in the application.
+ //
+ // @since 2.1
+ //
+ virtual void AppWidgetPopupProvider_Reserved1(void) {}
+
+ //
+ // This method is for internal use only. Using this method can cause behavioral,
+ // security-related, and consistency-related issues in the application.
+ //
+ // @since 2.1
+ //
+ virtual void AppWidgetPopupProvider_Reserved2(void) {}
+
+ //
+ // This method is for internal use only. Using this method can cause behavioral,
+ // security-related, and consistency-related issues in the application.
+ //
+ // @since 2.1
+ //
+ virtual void AppWidgetPopupProvider_Reserved3(void) {}
+
+private:
+ //
+ // Initializes this instance of %AppWidgetPopupProvider
+ //
+ // @since 2.1
+ //
+ result Construct(const Tizen::Base::String& instanceId, double x, double y);
+
+ //
+ // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
+ //
+ // @since 2.1
+ //
+ AppWidgetPopupProvider(const AppWidgetPopupProvider& rhs);
+
+ //
+ // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
+ //
+ // @since 2.1
+ //
+ AppWidgetPopupProvider& operator =(const AppWidgetPopupProvider& rhs);
+
+private:
+ class _AppWidgetPopupProviderImpl* __pAppWidgetPopupProviderImpl;
+
+ friend class _AppWidgetProviderManagerImpl;
+
+}; // AppWidgetPopupProvider
+
+}} // Tizen::Shell
+
+#endif /* _FSHELL_APPWIDGET_POPUP_PROVIDER_H_ */
--- /dev/null
+//
+// 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 FShellAppWidgetProvider.h
+ * @brief This is the header file for the AppWidgetProvider class.
+ *
+ * This header file contains the declarations of the %AppManager class.
+ */
+
+#ifndef _FSHELL_APPWIDGET_PROVIDER_H_
+#define _FSHELL_APPWIDGET_PROVIDER_H_
+
+#include <FBaseObject.h>
+
+namespace Tizen { namespace Shell
+{
+
+class AppWidgetFrame;
+
+/**
+ * @class AppWidgetProvider
+ * @brief This class is the abstract base class of all AppWidget provider
+ *
+ * @since 2.1
+ *
+ * The %AppWidgetProvider class is a base class which represents a AppWidget provider
+ */
+class _OSP_EXPORT_ AppWidgetProvider
+ : public Tizen::Base::Object
+{
+protected:
+
+ /**
+ * This is the default constructor for this class.
+ *
+ * @since 2.1
+ */
+ AppWidgetProvider(void);
+
+ /**
+ * This destructor overrides Tizen::Base::Object::~Object().
+ *
+ * @since 2.1
+ */
+ virtual ~AppWidgetProvider(void);
+
+ /**
+ * Called when the AppWidget provider is required to be created @n
+ *
+ * @since 2.1
+ *
+ * @param[in] width The width of the AppWidget
+ * @param[in] height The height of the AppWidget
+ * @param[in] userInfo User information that specifed when the AppWidget is added
+ *
+ * @return @c true if the method is successful, @n
+ * else @c false
+ *
+ * @remarks AppWidgetFrame should be created and set here
+ * @see SetAppWidgetFrame
+ *
+ * The following example demonstrates how to initialize the %AppWidgetProvider.
+ *
+ * @code
+ * #include <FShell.h>
+ *
+ * using namespace Tizen::Shell;
+ *
+ * void MyAppWidgetProvider::OnAppWidgetProviderInitializing(int width, int height, const String& userInfo)
+ * {
+ * AppWidgetFrame* pFrame = new MyAppWidgetProviderFrame();
+ * pFrame->Construct(Dimension(width, height));
+ * __pLabel = new Label();
+ *
+ * Rectangle bounds = GetBounds();
+ * __pLabel->Construct(bounds, L"TIZEN");
+ * AddControl(*__pLabel);
+ * this->SetAppWidgetFrame(pFrame);
+ * pFrame->Show();
+ *
+ * return true;
+ * }
+ * @endcode
+ */
+ virtual bool OnAppWidgetProviderInitializing(float width, float height, const Tizen::Base::String& userInfo) = 0;
+
+ /**
+ * Called when the AppWidget provider is required to be destroyed @n
+ *
+ * @since 2.1
+ */
+ virtual void OnAppWidgetProviderTerminating(void) = 0;
+
+ /**
+ * Called when the correspondent AppWidget is removed from AppWidget viewer application. (Home or Lock screen, etc)@n
+ * If you stored AppWidget provider state to persistent storage such as registry or DB, you can destroy by implementing this pure virtual function.@n
+ *
+ *
+ * @since 2.1
+ *
+ * @remarks This function is called after OnAppWidgetProviderTerminating called.
+ */
+ virtual void OnAppWidgetProviderRemoved(void) = 0;
+
+ /**
+ * Called when the AppWidget is required to be updated @n
+ * Your AppWidget provider can be updated by implementing this pure virtual function.
+ *
+ * @since 2.1
+ *
+ * @param[in] userInfo User information to update the AppWidget provider@n
+ * This parameter is delivered from AppWidgetProvider::RequestUpdate()
+ *
+ * @return @c true if the method is successful, @n
+ * else @c false
+ *
+ * @remarks This function is called when UpdatePeriod timer is expired or AppWidgetManager::RequestUpdate() is called.@n
+ */
+ virtual bool OnAppWidgetProviderUpdating(const Tizen::Base::String& userInfo) = 0;
+
+ /**
+ * Sets the AppWidgetFrame to the AppWidgetProvider
+ *
+ * @since 2.1
+ *
+ * @return An error code
+ * @param[in] pAppWidgetFrame The AppWidgetFrame to be set to the AppWidgetProvider
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The pointer to the AppWidgetFrame is null, or not constructed yet.
+ * @exception E_SYSTEM The method cannot proceed due to a severe system error.
+ *
+ * @remarks This function should be called only in OnAppWidgetProviderInitializing.
+ * @remarks AppWidgetFrame instance ownership is transferred to platform. After AppWidgetProvider::OnAppWidgetProviderTerminating() is called, AppWidgetPopup instance is removed automatically. AppWidgetFrame instance reuse is not allowed.
+ */
+ result SetAppWidgetFrame(AppWidgetFrame* pAppWidgetFrame);
+
+ /**
+ * Get the AppWidgetFrame from the AppWidgetProvider
+ *
+ * @since 2.1
+ *
+ * @return the AppWidgetFrame instnace, or null if any AppWidgetFrame isn't set yet.
+ */
+ AppWidgetFrame* GetAppWidgetFrame(void);
+
+ /**
+ * Get the AppWidgetFrame from the AppWidgetProvider
+ *
+ * @since 2.1
+ *
+ * @return the AppWidgetFrame instnace, or null if any AppWidgetFrame isn't set yet.
+ */
+ const AppWidgetFrame* GetAppWidgetFrame(void) const;
+
+protected:
+ //
+ // This method is for internal use only. Using this method can cause behavioral,
+ // security-related, and consistency-related issues in the application.
+ //
+ // @since 2.1
+ //
+ virtual void AppWidgetProvider_Reserved1(void) {}
+
+ //
+ // This method is for internal use only. Using this method can cause behavioral,
+ // security-related, and consistency-related issues in the application.
+ //
+ // @since 2.1
+ //
+ virtual void AppWidgetProvider_Reserved2(void) {}
+
+ //
+ // This method is for internal use only. Using this method can cause behavioral,
+ // security-related, and consistency-related issues in the application.
+ //
+ // @since 2.1
+ //
+ virtual void AppWidgetProvider_Reserved3(void) {}
+
+ //
+ // This method is for internal use only. Using this method can cause behavioral,
+ // security-related, and consistency-related issues in the application.
+ //
+ // @since 2.1
+ //
+ virtual void AppWidgetProvider_Reserved4(void) {}
+
+ //
+ // This method is for internal use only. Using this method can cause behavioral,
+ // security-related, and consistency-related issues in the application.
+ //
+ // @since 2.1
+ //
+ virtual void AppWidgetProvider_Reserved5(void) {}
+
+private:
+
+ //
+ // Initializes this instance of %AppWidgetProvider
+ //
+ // @since 2.1
+ //
+ result Construct(const Tizen::Base::String& instanceId);
+
+ //
+ // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
+ //
+ // @since 2.1
+ //
+ AppWidgetProvider(const AppWidgetProvider& rhs);
+
+ //
+ // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
+ //
+ // @since 2.1
+ //
+ AppWidgetProvider& operator =(const AppWidgetProvider& rhs);
+
+
+private:
+ class _AppWidgetProviderImpl* __pAppWidgetProviderImpl;
+
+ friend class _AppWidgetProviderManagerImpl;
+};
+
+}} // Tizen::Shell
+#endif /* _FSHELL_APPWIDGET_PROVIDER_H_ */
//
/**
- * @file FShellLiveboxProviderInfo.h
- * @brief This is the header file for the %LiveboxProviderInfo class.
+ * @file FShellAppWidgetProviderInfo.h
+ * @brief This is the header file for the %AppWidgetProviderInfo class.
*
- * This header file contains the declarations of the %LiveboxProviderInfo class.
+ * This header file contains the declarations of the %AppWidgetProviderInfo class.
*/
-#ifndef _FSHELL_LIVEBOX_PROVIDER_INFO_H_
-#define _FSHELL_LIVEBOX_PROVIDER_INFO_H_
+#ifndef _FSHELL_APPWIDGET_PROVIDER_INFO_H_
+#define _FSHELL_APPWIDGET_PROVIDER_INFO_H_
#include <FBaseString.h>
#include <FAppTypes.h>
{
/**
- * @class LiveboxProviderInfo
- * @brief This class contains static Livebox information
+ * @class AppWidgetProviderInfo
+ * @brief This class contains static AppWidget information
*
* @since 2.1
*
- * The %LiveboxProviderInfo class contains static Livebox information@n
+ * The %AppWidgetProviderInfo class contains static AppWidget information@n
*/
-class _OSP_EXPORT_ LiveboxProviderInfo
+class _OSP_EXPORT_ AppWidgetProviderInfo
: public Tizen::Base::Object
{
public:
*
* @since 2.1
*
- * @param[in] value An instance of %LiveboxProviderInfo
+ * @param[in] value An instance of %AppWidgetProviderInfo
*/
- LiveboxProviderInfo(const LiveboxProviderInfo& rhs);
+ AppWidgetProviderInfo(const AppWidgetProviderInfo& rhs);
/**
* This destructor overrides Tizen::Base::Object::~Object().
*
* @since 2.1
*/
- virtual ~LiveboxProviderInfo(void);
+ virtual ~AppWidgetProviderInfo(void);
/**
* Gets the application ID.
Tizen::App::AppId GetAppId(void) const;
/**
- * Gets the Livebox provider name
+ * Gets the AppWidget provider name
*
* @since 2.1
*
/**
* Gets the display name of the Livbox @n
* If the system language setting is changed, this method returns the localized application name.
- * The display name is displayed in applications that showing Livebox like Launcher, and so on.
+ * The display name is displayed in applications that showing AppWidget like Launcher, and so on.
*
* @since 2.1
*
Tizen::Base::String GetIconPath(void) const;
/**
- * Gets the Id of the application that exports AppContorl to configure the Livebox
+ * Gets the Id of the application that exports AppContorl to configure the AppWidget
*
* @since 2.1
*
- * @return The Id of the application that exports AppContorl to configure the Livebox @n
+ * @return The Id of the application that exports AppContorl to configure the AppWidget @n
* An empty string is returned if there is no value.
*
- * The following example demonstrates how to start the application control that is exported for Livebox configuration
+ * The following example demonstrates how to start the application control that is exported for AppWidget configuration
*
* @code
* #include <FShell.h>
*
* using namespace Tizen::Shell;
*
- * LiveboxProviderInfo* pProviderInfo = LiveboxManager::GetInstance()->GetLiveboxProviderInfoN(appId, providerName);
+ * AppWidgetProviderInfo* pProviderInfo = AppWidgetManager::GetInstance()->GetAppWidgetProviderInfoN(appId, providerName);
* if( !pProviderInfo->GetConfigurationAppControlAppId().IsEmpty )
* {
- * AppControl* pAc = AppManager::FindAppControlN(pProviderInfo->GetConfigurationAppControlAppId(), L"http://tizen.org/appcontrol/operation/livebox/configuration");
+ * AppControl* pAc = AppManager::FindAppControlN(pProviderInfo->GetConfigurationAppControlAppId(), L"http://tizen.org/appcontrol/operation/appwidget/configuration");
*
* HashMap map();
* map.Construct();
Tizen::Base::String GetConfigurationAppControlAppId(void) const;
/**
- * Checks whether the Livebox provider is default or not.
+ * Checks whether the AppWidget provider is default or not.
*
* @since 2.1
*
- * @return @c true if the Livebox is default @n
+ * @return @c true if the AppWidget is default @n
* else @c false
*
- * @remarks Default Livebox provider providing Livebox that represents application.@n
- * Home application can show Livebox instead of icon and text for applications that includes default Livebox provider.
+ * @remarks Default AppWidget provider providing AppWidget that represents application.@n
+ * Home application can show AppWidget instead of icon and text for applications that includes default AppWidget provider.
*/
bool IsDefault(void) const;
/**
- * Gets a list of LiveboxSizeInfo of the Livebox
+ * Gets a list of AppWidgetSizeInfo of the AppWidget
*
* @since 2.1
*
- * @return A pointer to the array list that contains all LiveboxSizeInfo of the LiveboxProvider@n
+ * @return A pointer to the array list that contains all AppWidgetSizeInfo of the AppWidgetProvider@n
* else @c null if an error occurs
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
private:
//
- // This is the constructor that initializes an instance of %LiveboxProviderInfo with the specified values.
+ // This is the constructor that initializes an instance of %AppWidgetProviderInfo with the specified values.
// This constructor is intentionally declared as private so that only the platform can create an instance.
//
// @since 2.1
//
- // @param[in] appId The Id of the application that provides Livebox
- // @param[in] name The name of the Livebox provider
+ // @param[in] appId The Id of the application that provides AppWidget
+ // @param[in] name The name of the AppWidget provider
//
- LiveboxProviderInfo(const Tizen::App::AppId& appId, const Tizen::Base::String& name);
+ AppWidgetProviderInfo(const Tizen::App::AppId& appId, const Tizen::Base::String& name);
//
// This default constructor is intentionally declared as private so that only the platform can create an instance.
//
// @since 2.1
//
- LiveboxProviderInfo(void);
+ AppWidgetProviderInfo(void);
//
// The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
// @since 2.1
//
//
- LiveboxProviderInfo& operator =(const LiveboxProviderInfo& rhs);
+ AppWidgetProviderInfo& operator =(const AppWidgetProviderInfo& rhs);
private:
- class _LiveboxProviderInfoImpl* __pLiveboxProviderInfoImpl;
+ class _AppWidgetProviderInfoImpl* __pAppWidgetProviderInfoImpl;
-friend class _LiveboxProviderInfoImpl;
+friend class _AppWidgetProviderInfoImpl;
};
}} // Tizen::Shell
-#endif /* _FSHELL_LIVEBOX_PROVIDER_INFO_H_ */
+#endif /* _FSHELL_APPWIDGET_PROVIDER_INFO_H_ */
--- /dev/null
+//
+// 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 FShellAppWidgetProviderManager.h
+ * @brief This is the header file for the %AppWidgetProviderManager class.
+ *
+ * This header file contains the declarations of the %AppWidgetProviderManager class.
+ */
+
+#ifndef _FSHELL_APPWIDGET_PROVIDER_MANAGER_H_
+#define _FSHELL_APPWIDGET_PROVIDER_MANAGER_H_
+
+#include <unique_ptr.h>
+#include <FBaseString.h>
+#include <FAppTypes.h>
+
+namespace Tizen { namespace Base { namespace Collection { class IList; } } }
+namespace Tizen { namespace Shell
+{
+
+class IAppWidgetProviderFactory;
+class IAppWidgetPopupProviderFactory;
+
+/**
+ * @class AppWidgetProviderManager
+ * @brief Manages all the AppWidget providers.
+ *
+ * @since 2.1
+ *
+ * @final This class is not intended for extension.
+ *
+ * The %AppWidgetProviderManager class manages all the AppWidget providers.
+ * The appwidget manager manages static and run time AppWidget information.
+ */
+class _OSP_EXPORT_ AppWidgetProviderManager
+ : public Tizen::Base::Object
+{
+public:
+
+ /**
+ * Gets the AppWidget manager instance.
+ *
+ * @since 2.1
+ *
+ * @return A pointer to the %AppWidgetProviderManager instance, @n
+ * else @c null if it fails
+ */
+ static AppWidgetProviderManager* GetInstance(void);
+
+ /**
+ * Requests AppWidget service to trigger specified AppWidget update
+ *
+ * @since 2.1
+ *
+ * @param[in] appId The appId that provides AppWidget
+ * @param[in] providerName The name of the AppWidget provider
+ * @param[in] userInfo User information for the AppWidget provider@n
+ * This parameter will be delivered as parameter of AppWidgetProvider::OnAppWidgetProviderUpdating()
+ *
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_APP_NOT_INSTALLED The application is not installed.
+ * @exception E_OBJ_NOT_FOUND The specified AppWidget provider is not found.
+ * @exception E_CERTIFICATE_VERIFICATION_FAILED The application isn't permitted to request to update AppWidget of other application package.@n
+ * To get permission, the target application is signed with the same certificate.
+ * @exception E_SYSTEM The method cannot proceed due to a severe system error.
+ *
+ * @see AppWidgetProvider::OnAppWidgetProviderUpdating()
+ */
+ result RequestUpdate(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Base::String& userInfo = L"");
+
+ /**
+ * Requests a AppWidget viewer(eg, Home screen, Lock screen) to add the specified AppWidget.
+ *
+ * @since 2.1
+ * @privlevel public
+ * @privilege http://tizen.org/privilege/appwidgetmanager
+ *
+ * @param[in] providerAppId The ID of the application providing AppWidget
+ * @param[in] providerName The name of AppWidget provider to be added
+ * @param[in] alternateText Alternate text displayed in the AppWidgetView while the AppWidgetProvider is initializing or unavailable.
+ * @param[in] userInfo User information for the AppWidget provider
+ *
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_APP_NOT_INSTALLED The application is not installed.
+ * @exception E_OBJ_NOT_FOUND The specified AppWidget provider is not found.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_CERTIFICATE_VERIFICATION_FAILED The application isn't permitted to request add AppWidget of other application package.
+ * To get permission, the target application is signed with the same certificate.
+ * @exception E_UNSUPPORTED_OPERATION The specified AppWidget provider doesn't support this operation.@
+ * To request a AppWidget viewer to add a AppWidget, AppWidget provider should support 1x1 size AppWidget, but the specified AppWidget provider doesn't support 1x1 size.
+ * @exception E_CONNECTION_FAILED The viewer application doesn't set a listener to receive this request.
+ * @exception E_SYSTEM The method cannot proceed due to a severe system error.
+ *
+ * @remarks Only AppWidget provider that is packaged with the caller application can be added by this API.
+ * @see SetAppWidgetAddRequestListener
+ */
+ result AddAppWidget(const Tizen::App::AppId& providerAppId, const Tizen::Base::String& providerName, const Tizen::Base::String& alternateText, const Tizen::Base::String& userInfo);
+
+ /**
+ * Sets a AppWidgetProvider factory. @n
+ * The factory is called when AppWidgetProvider is need to be created.
+ * This function should be called in App::OnAppInitializing(), to receive event correctly.
+ * Implementing AppWidgetProviderFactory is mandatory to provide AppWidget functionality.
+ *
+ * @since 2.1
+ *
+ * @return An error code
+ * @param[in] factory The factory to create concrete AppWidgetProvider
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The application's attribute doesn't meet conditon to provide AppWidget.
+ * @exception E_SYSTEM The method cannot proceed due to a severe system error.
+ * @see IAppWidgetProviderFactory
+ */
+ result SetAppWidgetProviderFactory(IAppWidgetProviderFactory& factory);
+
+ /**
+ * Sets a AppWidgetPopupProvider factory. @n
+ * The factory is called when AppWidgetPopupProvider is need to be created.
+ * This function should be called in App::OnAppInitializing(), to receive event correctly.
+ * Implementing AppWidgetPopupProviderFactory is mandatory to provide AppWidgetPopup functionality.
+ *
+ * @since 2.1
+ *
+ * @return An error code
+ * @param[in] factory The factory to create concrete AppWidgetPopupProvider
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_OPERATION The application's attribute doesn't meet conditon to provide AppWidget popup.
+ * @exception E_SYSTEM The method cannot proceed due to a severe system error.
+ * @see IAppWidgetPopupProviderFactory
+ */
+ result SetAppWidgetPopupProviderFactory(IAppWidgetPopupProviderFactory& factory);
+
+
+private:
+ //
+ // This default constructor is intentionally declared as private to implement the %Singleton semantic.
+ //
+ // @since 2.1
+ //
+ AppWidgetProviderManager(void);
+
+ //
+ // This destructor is intentionally declared as private to implement the %Singleton semantic.
+ //
+ // @since 2.1
+ //
+ virtual ~AppWidgetProviderManager(void);
+
+ /**
+ * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
+ *
+ * @since 2.1
+ */
+ AppWidgetProviderManager& operator =(const AppWidgetProviderManager& rhs);
+
+ //
+ // Constructs the instance of this class.
+ //
+ // @since 2.1
+ //
+ // @return An error code
+ // @exception E_SUCCESS The method is successful.
+ // @exception E_SYSTEM A system error has occurred.
+ //
+ result Construct(void);
+
+
+ static void InitSingleton(void);
+ static void DestroySingleton(void);
+
+private:
+ static AppWidgetProviderManager* __pTheInstance;
+ class _AppWidgetProviderManagerImpl* __pAppWidgetProviderManagerImpl;
+ friend struct std::default_delete< AppWidgetProviderManager >;
+}; // AppWidgetProviderManager
+
+}} // Tizen::Shell
+
+#endif /* _FSHELL_APPWIDGET_PROVIDER_MANAGER_H_ */
//
/**
- * @file FShellLiveboxProviderInfo.h
- * @brief This is the header file for the %LiveboxSizeInfo class.
+ * @file FShellAppWidgetProviderInfo.h
+ * @brief This is the header file for the %AppWidgetSizeInfo class.
*
- * This header file contains the declarations of the %LiveboxSizeInfo class.
+ * This header file contains the declarations of the %AppWidgetSizeInfo class.
*/
-#ifndef _FSHELL_LIVEBOX_SIZE_INFO_H_
-#define _FSHELL_LIVEBOX_SIZE_INFO_H_
+#ifndef _FSHELL_APPWIDGET_SIZE_INFO_H_
+#define _FSHELL_APPWIDGET_SIZE_INFO_H_
#include <FBaseString.h>
#include <FAppTypes.h>
namespace Tizen { namespace Shell
{
-class _LiveboxSizeInfoImpl;
+class _AppWidgetSizeInfoImpl;
/**
- * @class LiveboxSizeInfo
+ * @class AppWidgetSizeInfo
* @brief This class contains size and preview image path for the size
*
* @since 2.1
*/
-class _OSP_EXPORT_ LiveboxSizeInfo
+class _OSP_EXPORT_ AppWidgetSizeInfo
: public Tizen::Base::Object
{
public:
*
* @since 2.1
*/
- virtual ~LiveboxSizeInfo(void);
+ virtual ~AppWidgetSizeInfo(void);
/**
* Copying of objects using this copy constructor is allowed.
*
* @since 2.1
*
- * @param[in] rhs An instance of %LiveboxSizeInfo
+ * @param[in] rhs An instance of %AppWidgetSizeInfo
*/
- LiveboxSizeInfo(const LiveboxSizeInfo& rhs);
+ AppWidgetSizeInfo(const AppWidgetSizeInfo& rhs);
/**
* Gets the size
private:
//
- // This is the constructor that initializes an instance of %LiveboxSizeInfo with the specified values.
+ // This is the constructor that initializes an instance of %AppWidgetSizeInfo with the specified values.
// This constructor is intentionally declared as private so that only the platform can create an instance.
//
// @since 2.1
//
- // @param[in] size One of the size that the Livebox provider supports.
+ // @param[in] size One of the size that the AppWidget provider supports.
// @param[in] previewImagePath The preview image path for the size.
//
- LiveboxSizeInfo(Tizen::Graphics::FloatDimension size, const Tizen::Base::String& previewImagePath);
+ AppWidgetSizeInfo(Tizen::Graphics::FloatDimension size, const Tizen::Base::String& previewImagePath);
//
// This default constructor is intentionally declared as private so that only the platform can create an instance.
//
// @since 2.1
//
- LiveboxSizeInfo(void);
+ AppWidgetSizeInfo(void);
//
// The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
//
// @since 2.1
//
- LiveboxSizeInfo& operator =(const LiveboxSizeInfo& rhs);
+ AppWidgetSizeInfo& operator =(const AppWidgetSizeInfo& rhs);
private:
- _LiveboxSizeInfoImpl* __pLiveboxSizeInfoImpl;
+ _AppWidgetSizeInfoImpl* __pAppWidgetSizeInfoImpl;
-friend class _LiveboxSizeInfoImpl;
+friend class _AppWidgetSizeInfoImpl;
};
}} // Tizen::Shell
-#endif /* _FSHELL_LIVEBOX_SIZE_INFO_H_ */
+#endif /* _FSHELL_APPWIDGET_SIZE_INFO_H_ */
//
/**
- * @file FShellLiveboxView.h
- * @brief This is the header file for the %LiveboxView class.
+ * @file FShellAppWidgetView.h
+ * @brief This is the header file for the %AppWidgetView class.
*
- * This header file contains the declarations of the %LiveboxView class.
+ * This header file contains the declarations of the %AppWidgetView class.
*/
-#ifndef _FSHELL_LIVEBOX_VIEW_H_
-#define _FSHELL_LIVEBOX_VIEW_H_
+#ifndef _FSHELL_APPWIDGET_VIEW_H_
+#define _FSHELL_APPWIDGET_VIEW_H_
#include <FAppTypes.h>
#include <FUiContainer.h>
namespace Tizen { namespace Shell
{
+class IAppWidgetViewEventListener;
+class AppWidgetProviderInfo;
+
/**
- * @class LiveboxView
- * @brief This class provides the view control for a LiveboxViewer.
+ * @class AppWidgetView
+ * @brief This class provides the view control for a AppWidgetViewer.
* @since 2.1
*
- * The %LiveboxView shows a drawn buffer by LiveboxProvider.
+ * The %AppWidgetView shows a drawn buffer by AppWidgetProvider.
*
*/
-class _OSP_EXPORT_ LiveboxView
+class _OSP_EXPORT_ AppWidgetView
: public Tizen::Ui::Container
{
public:
*
* @since 2.1
*/
- LiveboxView(void);
+ AppWidgetView(void);
/**
* This destructor overrides Tizen::Base::Object::~Object().
*
* @since 2.1
*/
- virtual ~LiveboxView(void);
+ virtual ~AppWidgetView(void);
/**
- * Initializes this instance of %LiveboxView with the specified parameter.
+ * Initializes this instance of %AppWidgetView with the specified parameter.
*
* @since 2.1
* @return An error code
* @param[in] appId The AppId of the installed application
- * @param[in] providerName The name of the Livebox provider
- * @param[in] rect An instance of the FloatRectangle class @n\r
- * This instance represents the x and y coordinates of the top-left corner @n\r
- * of the created window along with its width and height. @n\r
- * @exception E_SUCCESS The method is successful.\r
- * @exception E_INVALID_ARG A specified input parameter is invalid.\r
- * @exception E_APP_NOT_INSTALLED The application is not installed.\r
- * @exception E_OBJ_NOT_FOUND The specified Livebox provider is not found.\r
- */\r
+ * @param[in] providerName The name of the AppWidget provider
+ * @param[in] rect An instance of the FloatRectangle class @n
+ * This instance represents the x and y coordinates of the top-left corner @n
+ * of the created window along with its width and height. @n
+ * @exception E_SUCCESS The method is successful.
+ * @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.
+ */
result Construct(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::FloatRectangle& rect);
- /**\r
- * Initializes this instance of %LiveboxView with the specified parameter.\r
- *\r
- * @since 2.1\r
- * @return An error code\r
- * @param[in] appId The AppId of the installed application\r
- * @param[in] providerName The name of the Livebox provider\r
- * @param[in] rect An instance of the FloatRectangle class @n\r
- * This instance represents the x and y coordinates of the top-left corner @n\r
- * of the created window along with its width and height. @n\r
- * @param[in] userInfo Extra data to be delivered to Livebox provider\r
- * @exception E_SUCCESS The method is successful.\r
- * @exception E_INVALID_ARG A specified input parameter is invalid.\r
- * @exception E_APP_NOT_INSTALLED The application is not installed.\r
- * @exception E_OBJ_NOT_FOUND The specified Livebox provider is not found.\r
- */\r
+ /**
+ * Initializes this instance of %AppWidgetView with the specified parameter.
+ *
+ * @since 2.1
+ * @return An error code
+ * @param[in] appId The AppId of the installed application
+ * @param[in] providerName The name of the AppWidget provider
+ * @param[in] rect An instance of the FloatRectangle class @n
+ * This instance represents the x and y coordinates of the top-left corner @n
+ * of the created window along with its width and height. @n
+ * @param[in] userInfo Extra data to be delivered to AppWidget provider
+ * @exception E_SUCCESS The method is successful.
+ * @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.
+ */
result Construct(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::FloatRectangle& rect, const Tizen::Base::String& userInfo);
+ /*
+ * Gets a AppWidgetProviderInfo of the specified AppWidget provider.
+ *
+ * @since 2.1
+ *
+ * @return A pointer to the AppWidgetProviderInfo of the specified AppWidgetProvider@n
+ * else @c null if an error occurs
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_APP_NOT_INSTALLED The application is not installed.
+ * @exception E_OBJ_NOT_FOUND The specified AppWidget provider is not found.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
+ */
+ AppWidgetProviderInfo* GetAppWidgetProviderInfoN(void) const;
+
+ /*
+ * Adds an IAppWidgetViewEventListener instance. @n
+ *
+ * @since 2.1
+ * @return An error code
+ * @param[in] listener The listener to add @n
+ * The listener must be allocated at heap, not stack.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OBJ_ALREADY_EXIST The listener has already been added.
+ * @see RemoveAppWidgetViewEventListener()
+ */
+ result AddAppWidgetViewEventListener(IAppWidgetViewEventListener& listener);
+
+ /*
+ * Removes an IAppWidgetViewEventListener instance. @n
+ * The removed listener cannot listen to the events when they are fired.
+ *
+ * @since 2.1
+ * @return An error code
+ * @param[in] listener The listener to remove @n
+ * The listener should be referring to previously allocated instance which is passed as an argument to AddAppWidgetViewEventListener().
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OBJ_NOT_FOUND The specified listener cannot be found.
+ * @see AddAppWidgetViewEventListener()
+ */
+ result RemoveAppWidgetViewEventListener(IAppWidgetViewEventListener& listener);
+
protected:
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
//
// Following method is reserved and may change its name at any time without prior notice.
//
- virtual void LiveboxView_Reserved1(void) {}
+ virtual void AppWidgetView_Reserved1(void) {}
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
//
// Following method is reserved and may change its name at any time without prior notice.
//
- virtual void LiveboxView_Reserved2(void) {}
+ virtual void AppWidgetView_Reserved2(void) {}
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
//
// Following method is reserved and may change its name at any time without prior notice.
//
- virtual void LiveboxView_Reserved3(void) {}
+ virtual void AppWidgetView_Reserved3(void) {}
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
//
// Following method is reserved and may change its name at any time without prior notice.
//
- virtual void LiveboxView_Reserved4(void) {}
+ virtual void AppWidgetView_Reserved4(void) {}
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
//
// Following method is reserved and may change its name at any time without prior notice.
//
- virtual void LiveboxView_Reserved5(void) {}
+ virtual void AppWidgetView_Reserved5(void) {}
private:
//
// The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
//
- LiveboxView(const LiveboxView& rhs);
+ AppWidgetView(const AppWidgetView& rhs);
//
// The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
//
- LiveboxView& operator =(const LiveboxView& rhs);
-}; // LiveboxView
+ AppWidgetView& operator =(const AppWidgetView& rhs);
+}; // AppWidgetView
}} // Tizen::Shell
-#endif // _FSHELL_LIVEBOX_VIEW_H_
+#endif // _FSHELL_APPWIDGET_VIEW_H_
//
/**
- * @file FShellILiveboxAddRequestListener.h
- * @brief This is the header file for the %ILiveboxAddRequestListener interface.
+ * @file FShellIAppWidgetAddRequestListener.h
+ * @brief This is the header file for the %IAppWidgetAddRequestListener interface.
*
- * This header file contains the declarations of the %ILiveboxAddRequestListener interface.
+ * This header file contains the declarations of the %IAppWidgetAddRequestListener interface.
*/
-#ifndef _FSHELL_ILIVEBOX_ADD_REQUEST_LISTENER_H_
-#define _FSHELL_ILIVEBOX_ADD_REQUEST_LISTENER_H_
+#ifndef _FSHELL_IAPPWIDGET_ADD_REQUEST_LISTENER_H_
+#define _FSHELL_IAPPWIDGET_ADD_REQUEST_LISTENER_H_
#include <FBaseRtIEventListener.h>
#include <FBaseString.h>
{
/**
- * @interface ILiveboxAddRequestListener
- * @brief This interface defines a listener for a Livebox viewer(eg, Home screen, Lock screen) that receives request to add Livebox
+ * @interface IAppWidgetAddRequestListener
+ * @brief This interface defines a listener for a AppWidget viewer(eg, Home screen, Lock screen) that receives request to add AppWidget
*
* @since 2.1
*
- * The %ILiveboxAddRequestListener interface defines a listener for a Livebox viewer(eg, Home screen, Lock screen) that receives request to add Livebox
+ * The %IAppWidgetAddRequestListener interface defines a listener for a AppWidget viewer(eg, Home screen, Lock screen) that receives request to add AppWidget
*/
-class _OSP_EXPORT_ ILiveboxAddRequestListener
+class _OSP_EXPORT_ IAppWidgetAddRequestListener
: virtual public Tizen::Base::Runtime::IEventListener
{
public:
*
* @since 2.1
*/
- virtual ~ILiveboxAddRequestListener() {}
+ virtual ~IAppWidgetAddRequestListener() {}
/**
- * Called when requested to add a Livebox @n
- * The Livebox viewer application such as the Home screen can get callback request to add a Livebox by implementing this listener. @n
+ * Called when requested to add a AppWidget @n
+ * The AppWidget viewer application such as the Home screen can get callback request to add a AppWidget by implementing this listener. @n
*
- * @param[in] appId The application ID of the application providing Livebox
- * @param[in] providerName The name of Livebox provider to be added
- * @param[in] text Alternative text for the Livebox
- * @param[in] userInfo User information for the Livebox provider
- * @see LiveboxManager::AddLivebox()
+ * @param[in] appId The application ID of the application providing AppWidget
+ * @param[in] providerName The name of AppWidget provider to be added
+ * @param[in] text Alternative text for the AppWidget
+ * @param[in] userInfo User information for the AppWidget provider
+ * @see AppWidgetManager::AddAppWidget()
*/
- virtual void OnLiveboxAddRequested(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Base::String& text, const Tizen::Base::String& userInfo) = 0;
+ virtual void OnAppWidgetAddRequested(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Base::String& text, const Tizen::Base::String& userInfo) = 0;
protected:
//
//
// @since 2.1
//
- virtual void ILiveboxAddReqeustListener_Reserved1(void) {}
+ virtual void IAppWidgetAddReqeustListener_Reserved1(void) {}
//
// This method is for internal use only. Using this method can cause behavioral,
//
// @since 2.1
//
- virtual void ILiveboxAddReqeustListener_Reserved2(void) {}
+ virtual void IAppWidgetAddReqeustListener_Reserved2(void) {}
//
// This method is for internal use only. Using this method can cause behavioral,
//
// @since 2.1
//
- virtual void ILiveboxAddReqeustListener_Reserved3(void) {}
+ virtual void IAppWidgetAddReqeustListener_Reserved3(void) {}
};
}} // Tizen::Shell
-#endif /* _FSHELL_ILIVEBOX_ADD_REQUEST_LISTENER_H_ */
+#endif /* _FSHELL_IAPPWIDGET_ADD_REQUEST_LISTENER_H_ */
// limitations under the License.
//
/**
- * @file FShellILiveboxPopupProvider.h
- * @brief This is the header file for the %ILiveboxPopupProviderFactory interface.
+ * @file FShellIAppWidgetPopupProvider.h
+ * @brief This is the header file for the %IAppWidgetPopupProviderFactory interface.
*
- * This header file contains the declarations of the %ILiveboxPopupProviderFactory interface.
+ * This header file contains the declarations of the %IAppWidgetPopupProviderFactory interface.
*/
-#ifndef _FSHELL_ILIVEBOX_POPUP_PROVIDER_FACTORY_H_
-#define _FSHELL_ILIVEBOX_POPUP_PROVIDER_FACTORY_H_
+#ifndef _FSHELL_IAPPWIDGET_POPUP_PROVIDER_FACTORY_H_
+#define _FSHELL_IAPPWIDGET_POPUP_PROVIDER_FACTORY_H_
#include <FBaseString.h>
-#include <FShellLiveboxPopupProvider.h>
+#include <FShellAppWidgetPopupProvider.h>
namespace Tizen { namespace Shell
{
-class LiveboxPopupProvider;
+class AppWidgetPopupProvider;
/**
- * @interface ILiveboxPopupProviderFactory
- * @brief This interface defines the factory for the %LiveboxPopupProvider creation
+ * @interface IAppWidgetPopupProviderFactory
+ * @brief This interface defines the factory for the %AppWidgetPopupProvider creation
*
* @since 2.1
*
- * The %ILiveboxPopupProviderFactory is the factory interface for creating the %LiveboxPopupProvider instance.
- * The %LiveboxManager calls CreateInstance() when an instance of %ILiveboxPopupProvider is required.
+ * The %IAppWidgetPopupProviderFactory is the factory interface for creating the %AppWidgetPopupProvider instance.
+ * The %AppWidgetManager calls CreateInstance() when an instance of %IAppWidgetPopupProvider is required.
*
- * @see LiveboxManager
+ * @see AppWidgetManager
*/
-class _OSP_EXPORT_ ILiveboxPopupProviderFactory
+class _OSP_EXPORT_ IAppWidgetPopupProviderFactory
{
public:
/**
*
* @since 2.1
*/
- virtual ~ILiveboxPopupProviderFactory() {};
+ virtual ~IAppWidgetPopupProviderFactory() {};
/**
- * Creates a LiveboxPopupProvider instance@n
- * Called when the LiveboxPopupProvider creation request is received from the livebox service. @n
- * Applications that provide the Livebox functionality must implement this listener.
+ * Creates a AppWidgetPopupProvider instance@n
+ * Called when the AppWidgetPopupProvider creation request is received from the appwidget service. @n
+ * Applications that provide the AppWidget functionality must implement this listener.
*
* @since 2.1
*
- * @param[in] providerName The Livebox provider name
- * @param[in] userInfo User information that specifed when the Livebox is added
+ * @param[in] providerName The AppWidget provider name
+ * @param[in] userInfo User information that specifed when the AppWidget is added
*/
- virtual LiveboxPopupProvider* CreateInstance(const Tizen::Base::String& providerName, const Tizen::Base::String& userInfo) = 0;
+ virtual AppWidgetPopupProvider* CreateInstance(const Tizen::Base::String& providerName, const Tizen::Base::String& userInfo) = 0;
protected:
//
//
// @since 2.1
//
- virtual void ILiveboxPopupProvider_Reserved1(void) {}
+ virtual void IAppWidgetPopupProvider_Reserved1(void) {}
//
// This method is for internal use only. Using this method can cause behavioral,
//
// @since 2.1
//
- virtual void ILiveboxPopupProvider_Reserved2(void) {}
+ virtual void IAppWidgetPopupProvider_Reserved2(void) {}
//
// This method is for internal use only. Using this method can cause behavioral,
//
// @since 2.1
//
- virtual void ILiveboxPopupProvider_Reserved3(void) {}
+ virtual void IAppWidgetPopupProvider_Reserved3(void) {}
};
}} // Tizen::Shell
-#endif /* _ILIVEBOX_POPUP_FACTORY_H_ */
+#endif /* _IAPPWIDGET_POPUP_FACTORY_H_ */
//
/**
- * @file FShellILiveboxProviderFactory.h
- * @brief This is the header file for the %ILiveboxProviderFactory interface.
+ * @file FShellIAppWidgetProviderFactory.h
+ * @brief This is the header file for the %IAppWidgetProviderFactory interface.
*
- * This header file contains the declarations of the %ILiveboxProviderFactory interface.
+ * This header file contains the declarations of the %IAppWidgetProviderFactory interface.
*/
-#ifndef _FSHELL_ILIVEBOX_PROVIDER_FACTORY_H_
-#define _FSHELL_ILIVEBOX_PROVIDER_FACTORY_H_
+#ifndef _FSHELL_IAPPWIDGET_PROVIDER_FACTORY_H_
+#define _FSHELL_IAPPWIDGET_PROVIDER_FACTORY_H_
#include <FBaseString.h>
namespace Tizen { namespace Shell
{
-class LiveboxProvider;
+class AppWidgetProvider;
/**
- * @interface ILiveboxProviderFactory
- * @brief This interface defines the factory for the %LiveboxProvider creation
+ * @interface IAppWidgetProviderFactory
+ * @brief This interface defines the factory for the %AppWidgetProvider creation
*
* @since 2.1
*
- * The %ILiveboxProviderFactory interface defines a factory for the %LiveboxProvider creation
- * The %LiveboxManager calls CreateInstance() when an instance of %LiveboxProvider is required.
- * Applications that provide the %LiveboxProvider functionality must implement this interface.
+ * The %IAppWidgetProviderFactory interface defines a factory for the %AppWidgetProvider creation
+ * The %AppWidgetManager calls CreateInstance() when an instance of %AppWidgetProvider is required.
+ * Applications that provide the %AppWidgetProvider functionality must implement this interface.
*
- * @see LiveboxManager
+ * @see AppWidgetManager
*/
-class _OSP_EXPORT_ ILiveboxProviderFactory
+class _OSP_EXPORT_ IAppWidgetProviderFactory
{
public:
/**
*
* @since 2.1
*/
- virtual ~ILiveboxProviderFactory() {};
+ virtual ~IAppWidgetProviderFactory() {};
/**
- * Called when the LiveboxProvider creation request is received from the livebox service. @n
- * Applications that provide the %LiveboxProvider functionality must implement this listener.
+ * Called when the AppWidgetProvider creation request is received from the appwidget service. @n
+ * Applications that provide the %AppWidgetProvider functionality must implement this listener.
*
* @since 2.1
*
- * @param[in] providerName The Livebox provider name
- * @param[in] width The width of the Livebox
- * @param[in] height The height of the Livebox
- * @param[in] userInfo User information that specifed when the Livebox is added
+ * @param[in] providerName The AppWidget provider name
+ * @param[in] width The width of the AppWidget
+ * @param[in] height The height of the AppWidget
+ * @param[in] userInfo User information that specifed when the AppWidget is added
*/
- virtual LiveboxProvider* CreateInstance(const Tizen::Base::String& providerName, float width, float height, const Tizen::Base::String& userInfo) = 0;
+ virtual AppWidgetProvider* CreateInstance(const Tizen::Base::String& providerName, float width, float height, const Tizen::Base::String& userInfo) = 0;
protected:
//
//
// @since 2.1
//
- virtual void ILiveboxProviderFactory_Reserved1(void) {}
+ virtual void IAppWidgetProviderFactory_Reserved1(void) {}
//
// This method is for internal use only. Using this method can cause behavioral,
//
// @since 2.1
//
- virtual void ILiveboxProviderFactory_Reserved2(void) {}
+ virtual void IAppWidgetProviderFactory_Reserved2(void) {}
//
// This method is for internal use only. Using this method can cause behavioral,
//
// @since 2.1
//
- virtual void ILiveboxProviderFactory_Reserved3(void) {}
+ virtual void IAppWidgetProviderFactory_Reserved3(void) {}
};
}} // Tizen::Shell
-#endif /* _FSHELL_ILIVEBOX_PROVIDER_FACTORY_H_ */
+#endif /* _FSHELL_IAPPWIDGET_PROVIDER_FACTORY_H_ */
--- /dev/null
+//
+// 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 FShellIAppWidgetViewEventListener.h
+ * @brief This is the header file for the %IAppWidgetViewEventListener interface.
+ *
+ * This header file contains the declarations of the %IAppWidgetViewEventListener interface.
+ */
+
+#ifndef _FSHELL_IAPP_WIDGET_VIEW_EVENT_LISTENER_H_
+#define _FSHELL_IAPP_WIDGET_VIEW_EVENT_LISTENER_H_
+
+#include <FBaseRtIEventListener.h>
+
+namespace Tizen { namespace Shell
+{
+
+class AppWidgetView;
+
+/*
+ * @interface IAppWidgetViewEventListener
+ * @brief This interface defines a listener for the AppWidgetView that receives AppWidgetProvider removed event.
+ *
+ * @since 2.1
+ *
+ * The %IAppWidgetViewEventListener interface defines a listener for the AppWidgetView that receives AppWidgetProvider removed event.
+ */
+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
+ */
+ virtual ~IAppWidgetViewEventListener(void) {}
+
+ /*\r
+ * Called when a AppWidgetProvider instance is about to be removed. @n
+ *\r
+ * @since 2.1\r
+ *\r
+ * @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
+ virtual void IAppWidgetViewEventListener_Reserved5(void) {}
+};
+
+}} // Tizen::Shell
+
+#endif /* _FSHELL_IAPP_WIDGET_VIEW_EVENT_LISTENER_H_ */
+++ /dev/null
-//
-// 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 FShellLiveboxPopupProvider.h
- * @brief This is the header file for the LiveboxPopupProvider class.
- *
- * This header file contains the declarations of the %LiveboxPopupProvider class.
- */
-
-#ifndef _FSHELL_LIVEBOX_POPUP_PROVIDER_H_
-#define _FSHELL_LIVEBOX_POPUP_PROVIDER_H_
-
-#include <FBaseObject.h>
-
-namespace Tizen { namespace Shell
-{
-
-class LiveboxPopup;
-
-/**
- * @class LiveboxPopupProvider
- * @brief This class is the abstract base class of all Livebox popup provider
- *
- * @since 2.1
- *
- * The %LiveboxPopupProvider class is a base class which represents a Livebox popup provider
- */
-class _OSP_EXPORT_ LiveboxPopupProvider
- : public Tizen::Base::Object
-{
-protected:
- /**
- * This is the default constructor for this class.
- *
- * @since 2.1
- */
- LiveboxPopupProvider(void);
-
- /**
- * This destructor overrides Tizen::Base::Object::~Object().
- *
- * @since 2.1
- */
- virtual ~LiveboxPopupProvider(void);
-
- /**
- * Called when the Livebox popup provider is required to be created @n
- *
- * @since 2.1
- *
- * @param[in] userInfo User information that specifed when the Livebox is added
- * @return @c true if the method is successful, @n
- * else @c false\r
- *
- * @remarks LiveboxPopup should be created and set here
- * @see SetLiveboxPopup
- */
- virtual bool OnLiveboxPopupProviderInitializing(const Tizen::Base::String& userInfo) = 0;
-
- /**
- * Called when the Livebox popup provider is required to be destroyed @n
- *
- * @since 2.1
- */
- virtual void OnLiveboxPopupProviderTerminating(void) = 0;
-
- /**
- * Sets the Livebox popup to the Livebox popup provider
- *
- * @since 2.1
- *
- * @return An error code
- * @param[in] pLiveboxPopup The pointer to LiveboxPopup instance to be set to the Livebox
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The pointer to the LiveboxFrame is null, or not constructed yet.
- * @exception E_SYSTEM The method cannot proceed due to a severe system error.
- *
- * @remarks This function should be called only in OnLiveboxPopupProviderInitializing.
- * @remarks LiveboxPopup instance ownership is transferred to platform. After LiveboxPopupProvider::OnLiveboxPopupProviderTerminating() is called, LiveboxPopup instance is removed automatically. LiveboxPopup instance reuse is not allowed.
- */
- result SetLiveboxPopup(Tizen::Shell::LiveboxPopup* pLiveboxPopup);
-
- /**
- * Gets the Livebox popup
- *
- * @since 2.1
- *
- * @return The LiveboxPopup instnace, or null if any LiveboxPopup is set yet.
- */
- Tizen::Shell::LiveboxPopup* GetLiveboxPopup(void);
-
- /**
- * Gets the Livebox popup from the Livebox
- *
- * @since 2.1
- *
- * @return The LiveboxPopup instnace, or null if any LiveboxPopup is set yet.
- */
- const Tizen::Shell::LiveboxPopup* GetLiveboxPopup(void) const;
-
- /**
- * Requests Livebox service to trigger specified Livebox update
- *
- * @since 2.1
- *
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM The method cannot proceed due to a severe system error.
- */
- result RequestUpdateToLivebox(void);
-
-protected:
- //
- // This method is for internal use only. Using this method can cause behavioral,
- // security-related, and consistency-related issues in the application.
- //
- // @since 2.1
- //
- virtual void LiveboxPopupProvider_Reserved1(void) {}
-
- //
- // This method is for internal use only. Using this method can cause behavioral,
- // security-related, and consistency-related issues in the application.
- //
- // @since 2.1
- //
- virtual void LiveboxPopupProvider_Reserved2(void) {}
-
- //
- // This method is for internal use only. Using this method can cause behavioral,
- // security-related, and consistency-related issues in the application.
- //
- // @since 2.1
- //
- virtual void LiveboxPopupProvider_Reserved3(void) {}
-
-private:
- //
- // Initializes this instance of %LiveboxPopupProvider
- //
- // @since 2.1
- //
- result Construct(const Tizen::Base::String& instanceId, double x, double y);
-
- //
- // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
- //
- // @since 2.1
- //
- LiveboxPopupProvider(const LiveboxPopupProvider& rhs);
-
- //
- // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
- //
- // @since 2.1
- //
- LiveboxPopupProvider& operator =(const LiveboxPopupProvider& rhs);
-
-private:
- class _LiveboxPopupProviderImpl* __pLiveboxPopupProviderImpl;
-
- friend class _LiveboxProviderManagerImpl;
-
-}; // LiveboxPopupProvider
-
-}} // Tizen::Shell
-
-#endif /* _FSHELL_LIVEBOX_POPUP_PROVIDER_H_ */
+++ /dev/null
-//
-// 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 FShellLiveboxProvider.h
- * @brief This is the header file for the LiveboxProvider class.
- *
- * This header file contains the declarations of the %AppManager class.
- */
-
-#ifndef _FSHELL_LIVEBOX_PROVIDER_H_
-#define _FSHELL_LIVEBOX_PROVIDER_H_
-
-#include <FBaseObject.h>
-
-namespace Tizen { namespace Shell
-{
-
-class LiveboxFrame;
-
-/**
- * @class LiveboxProvider
- * @brief This class is the abstract base class of all Livebox provider
- *
- * @since 2.1
- *
- * The %LiveboxProvider class is a base class which represents a Livebox provider
- */
-class _OSP_EXPORT_ LiveboxProvider
- : public Tizen::Base::Object
-{
-protected:
-
- /**
- * This is the default constructor for this class.
- *
- * @since 2.1
- */
- LiveboxProvider(void);
-
- /**
- * This destructor overrides Tizen::Base::Object::~Object().
- *
- * @since 2.1
- */
- virtual ~LiveboxProvider(void);
-
- /**
- * Called when the Livebox provider is required to be created @n
- *
- * @since 2.1
- *
- * @param[in] width The width of the Livebox
- * @param[in] height The height of the Livebox
- * @param[in] userInfo User information that specifed when the Livebox is added
- *
- * @return @c true if the method is successful, @n
- * else @c false
- *
- * @remarks LiveboxFrame should be created and set here
- * @see SetLiveboxFrame
- *
- * The following example demonstrates how to initialize the %LiveboxProvider.
- *
- * @code
- * #include <FShell.h>
- *
- * using namespace Tizen::Shell;
- *
- * void MyLiveboxProvider::OnLiveboxProviderInitializing(int width, int height, const String& userInfo)
- * {
- * LiveboxFrame* pFrame = new MyLiveboxProviderFrame();
- * pFrame->Construct(Dimension(width, height));
- * __pLabel = new Label();
- *
- * Rectangle bounds = GetBounds();
- * __pLabel->Construct(bounds, L"TIZEN");
- * AddControl(*__pLabel);
- * this->SetLiveboxFrame(pFrame);
- * pFrame->Show();
- *
- * return true;
- * }
- * @endcode
- */
- virtual bool OnLiveboxProviderInitializing(float width, float height, const Tizen::Base::String& userInfo) = 0;
-
- /**
- * Called when the Livebox provider is required to be destroyed @n
- *
- * @since 2.1
- */
- virtual void OnLiveboxProviderTerminating(void) = 0;
-
- /**
- * Called when the correspondent Livebox is removed from Livebox viewer application. (Home or Lock screen, etc)@n
- * If you stored Livebox provider state to persistent storage such as registry or DB, you can destroy by implementing this pure virtual function.@n
- *
- *
- * @since 2.1
- *
- * @remarks This function is called after OnLiveboxProviderTerminating called.
- */
- virtual void OnLiveboxProviderRemoved(void) = 0;
-
- /**
- * Called when the Livebox is required to be updated @n
- * Your Livebox provider can be updated by implementing this pure virtual function.
- *
- * @since 2.1
- *
- * @param[in] userInfo User information to update the Livebox provider@n
- * This parameter is delivered from LiveboxProvider::RequestUpdate()
- *
- * @return @c true if the method is successful, @n
- * else @c false
- *
- * @remarks This function is called when UpdatePeriod timer is expired or LiveboxManager::RequestUpdate() is called.@n
- */
- virtual bool OnLiveboxProviderUpdating(const Tizen::Base::String& userInfo) = 0;
-
- /**
- * Sets the LiveboxFrame to the LiveboxProvider
- *
- * @since 2.1
- *
- * @return An error code
- * @param[in] pLiveboxFrame The LiveboxFrame to be set to the LiveboxProvider
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The pointer to the LiveboxFrame is null, or not constructed yet.
- * @exception E_SYSTEM The method cannot proceed due to a severe system error.
- *
- * @remarks This function should be called only in OnLiveboxProviderInitializing.
- * @remarks LiveboxFrame instance ownership is transferred to platform. After LiveboxProvider::OnLiveboxProviderTerminating() is called, LiveboxPopup instance is removed automatically. LiveboxFrame instance reuse is not allowed.
- */
- result SetLiveboxFrame(LiveboxFrame* pLiveboxFrame);
-
- /**
- * Get the LiveboxFrame from the LiveboxProvider
- *
- * @since 2.1
- *
- * @return the LiveboxFrame instnace, or null if any LiveboxFrame isn't set yet.
- */
- LiveboxFrame* GetLiveboxFrame(void);
-
- /**
- * Get the LiveboxFrame from the LiveboxProvider
- *
- * @since 2.1
- *
- * @return the LiveboxFrame instnace, or null if any LiveboxFrame isn't set yet.
- */
- const LiveboxFrame* GetLiveboxFrame(void) const;
-
-protected:
- //
- // This method is for internal use only. Using this method can cause behavioral,
- // security-related, and consistency-related issues in the application.
- //
- // @since 2.1
- //
- virtual void LiveboxProvider_Reserved1(void) {}
-
- //
- // This method is for internal use only. Using this method can cause behavioral,
- // security-related, and consistency-related issues in the application.
- //
- // @since 2.1
- //
- virtual void LiveboxProvider_Reserved2(void) {}
-
- //
- // This method is for internal use only. Using this method can cause behavioral,
- // security-related, and consistency-related issues in the application.
- //
- // @since 2.1
- //
- virtual void LiveboxProvider_Reserved3(void) {}
-
- //
- // This method is for internal use only. Using this method can cause behavioral,
- // security-related, and consistency-related issues in the application.
- //
- // @since 2.1
- //
- virtual void LiveboxProvider_Reserved4(void) {}
-
- //
- // This method is for internal use only. Using this method can cause behavioral,
- // security-related, and consistency-related issues in the application.
- //
- // @since 2.1
- //
- virtual void LiveboxProvider_Reserved5(void) {}
-
-private:
-
- //
- // Initializes this instance of %LiveboxProvider
- //
- // @since 2.1
- //
- result Construct(const Tizen::Base::String& instanceId);
-
- //
- // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
- //
- // @since 2.1
- //
- LiveboxProvider(const LiveboxProvider& rhs);
-
- //
- // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
- //
- // @since 2.1
- //
- LiveboxProvider& operator =(const LiveboxProvider& rhs);
-
-
-private:
- class _LiveboxProviderImpl* __pLiveboxProviderImpl;
-
- friend class _LiveboxProviderManagerImpl;
-};
-
-}} // Tizen::Shell
-#endif /* _FSHELL_LIVEBOX_PROVIDER_H_ */
+++ /dev/null
-//
-// 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 FShellLiveboxProviderManager.h
- * @brief This is the header file for the %LiveboxProviderManager class.
- *
- * This header file contains the declarations of the %LiveboxProviderManager class.
- */
-
-#ifndef _FSHELL_LIVEBOX_PROVIDER_MANAGER_H_
-#define _FSHELL_LIVEBOX_PROVIDER_MANAGER_H_
-
-#include <unique_ptr.h>
-#include <FBaseString.h>
-#include <FAppTypes.h>
-
-namespace Tizen { namespace Base { namespace Collection { class IList; } } }
-namespace Tizen { namespace Shell
-{
-
-class ILiveboxProviderFactory;
-class ILiveboxPopupProviderFactory;
-
-/**
- * @class LiveboxProviderManager
- * @brief Manages all the Livebox providers.
- *
- * @since 2.1
- *
- * @final This class is not intended for extension.
- *
- * The %LiveboxProviderManager class manages all the Livebox providers.
- * The livebox manager manages static and run time Livebox information.
- */
-class _OSP_EXPORT_ LiveboxProviderManager
- : public Tizen::Base::Object
-{
-public:
-
- /**
- * Gets the Livebox manager instance.
- *
- * @since 2.1
- *
- * @return A pointer to the %LiveboxProviderManager instance, @n
- * else @c null if it fails
- */
- static LiveboxProviderManager* GetInstance(void);
-
- /**
- * Requests Livebox service to trigger specified Livebox update
- *
- * @since 2.1
- *
- * @param[in] appId The appId that provides Livebox
- * @param[in] providerName The name of the Livebox provider
- * @param[in] userInfo User information for the Livebox provider@n
- * This parameter will be delivered as parameter of LiveboxProvider::OnLiveboxProviderUpdating()
- *
- * @exception E_SUCCESS The method is successful.
- * @exception E_APP_NOT_INSTALLED The application is not installed.
- * @exception E_OBJ_NOT_FOUND The specified Livebox provider is not found.
- * @exception E_CERTIFICATE_VERIFICATION_FAILED The application isn't permitted to request to update Livebox of other application package.@n
- * To get permission, the target application is signed with the same certificate.
- * @exception E_SYSTEM The method cannot proceed due to a severe system error.
- *
- * @see LiveboxProvider::OnLiveboxProviderUpdating()
- */
- result RequestUpdate(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Base::String& userInfo = L"");
-
- /**
- * Requests a Livebox viewer(eg, Home screen, Lock screen) to add the specified Livebox.
- *
- * @since 2.1
- * @privlevel public
- * @privilege http://tizen.org/privilege/liveboxmanager
- *
- * @param[in] providerAppId The ID of the application providing Livebox
- * @param[in] providerName The name of Livebox provider to be added
- * @param[in] alternateText Alternate text displayed in the LiveboxView while the LiveboxProvider is initializing or unavailable.
- * @param[in] userInfo User information for the Livebox provider
- *
- * @exception E_SUCCESS The method is successful.
- * @exception E_APP_NOT_INSTALLED The application is not installed.
- * @exception E_OBJ_NOT_FOUND The specified Livebox provider is not found.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_CERTIFICATE_VERIFICATION_FAILED The application isn't permitted to request add Livebox of other application package.
- * To get permission, the target application is signed with the same certificate.
- * @exception E_UNSUPPORTED_OPERATION The specified Livebox provider doesn't support this operation.@
- * To request a Livebox viewer to add a Livebox, Livebox provider should support 1x1 size Livebox, but the specified Livebox provider doesn't support 1x1 size.
- * @exception E_CONNECTION_FAILED The viewer application doesn't set a listener to receive this request.
- * @exception E_SYSTEM The method cannot proceed due to a severe system error.
- *
- * @remarks Only Livebox provider that is packaged with the caller application can be added by this API.
- * @see SetLiveboxAddRequestListener
- */
- result AddLivebox(const Tizen::App::AppId& providerAppId, const Tizen::Base::String& providerName, const Tizen::Base::String& alternateText, const Tizen::Base::String& userInfo);
-
- /**
- * Sets a LiveboxProvider factory. @n
- * The factory is called when LiveboxProvider is need to be created.
- * This function should be called in App::OnAppInitializing(), to receive event correctly.
- * Implementing LiveboxProviderFactory is mandatory to provide Livebox functionality.
- *
- * @since 2.1
- *
- * @return An error code
- * @param[in] factory The factory to create concrete LiveboxProvider
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The application's attribute doesn't meet conditon to provide Livebox.
- * @exception E_SYSTEM The method cannot proceed due to a severe system error.
- * @see ILiveboxProviderFactory
- */
- result SetLiveboxProviderFactory(ILiveboxProviderFactory& factory);
-
- /**
- * Sets a LiveboxPopupProvider factory. @n
- * The factory is called when LiveboxPopupProvider is need to be created.
- * This function should be called in App::OnAppInitializing(), to receive event correctly.
- * Implementing LiveboxPopupProviderFactory is mandatory to provide LiveboxPopup functionality.
- *
- * @since 2.1
- *
- * @return An error code
- * @param[in] factory The factory to create concrete LiveboxPopupProvider
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION The application's attribute doesn't meet conditon to provide Livebox popup.
- * @exception E_SYSTEM The method cannot proceed due to a severe system error.
- * @see ILiveboxPopupProviderFactory
- */
- result SetLiveboxPopupProviderFactory(ILiveboxPopupProviderFactory& factory);
-
-
-private:
- //
- // This default constructor is intentionally declared as private to implement the %Singleton semantic.
- //
- // @since 2.1
- //
- LiveboxProviderManager(void);
-
- //
- // This destructor is intentionally declared as private to implement the %Singleton semantic.
- //
- // @since 2.1
- //
- virtual ~LiveboxProviderManager(void);
-
- /**
- * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
- *
- * @since 2.1
- */
- LiveboxProviderManager& operator =(const LiveboxProviderManager& rhs);
-
- //
- // Constructs the instance of this class.
- //
- // @since 2.1
- //
- // @return An error code
- // @exception E_SUCCESS The method is successful.
- // @exception E_SYSTEM A system error has occurred.
- //
- result Construct(void);
-
-
- static void InitSingleton(void);
- static void DestroySingleton(void);
-
-private:
- static LiveboxProviderManager* __pTheInstance;
- class _LiveboxProviderManagerImpl* __pLiveboxProviderManagerImpl;
- friend struct std::default_delete< LiveboxProviderManager >;
-}; // LiveboxProviderManager
-
-}} // Tizen::Shell
-
-#endif /* _FSHELL_LIVEBOX_PROVIDER_MANAGER_H_ */
FShell_QuickPanelFrame.cpp
FShell_QuickPanelFrameImpl.cpp
FShell_QuickPanelFramePresenter.cpp
- FShell_LiveboxProviderImpl.cpp
- FShell_LiveboxPopupProviderImpl.cpp
- FShell_LiveboxProviderInfoImpl.cpp
- FShell_LiveboxSizeInfoImpl.cpp
- FShell_LiveboxManagerImpl.cpp
- FShell_LiveboxProviderManagerImpl.cpp
- FShell_LiveboxManagerProxy.cpp
- FShellLiveboxProvider.cpp
- FShellLiveboxPopupProvider.cpp
- FShellLiveboxProviderInfo.cpp
- FShellLiveboxSizeInfo.cpp
- FShellLiveboxManager.cpp
- FShellLiveboxProviderManager.cpp
- FShell_LiveboxManagerIpcMessage.cpp
- FShell_LiveboxFrame.cpp
- FShell_LiveboxFrameImpl.cpp
- FShell_LiveboxFrameModel.cpp
- FShell_LiveboxFramePresenter.cpp
- FShell_LiveboxLayer.cpp
- FShell_LiveboxPopup.cpp
- FShell_LiveboxPopupImpl.cpp
- FShell_LiveboxPopupModel.cpp
- FShell_LiveboxPopupPresenter.cpp
- FShell_LiveboxPopupView.cpp
- FShell_LiveboxPopupViewEvent.cpp
- FShell_LiveboxPopupViewPresenter.cpp
- FShell_LiveboxView.cpp
- FShell_LiveboxViewImpl.cpp
- FShell_LiveboxViewManager.cpp
- FShell_LiveboxViewModel.cpp
- FShell_LiveboxViewPresenter.cpp
- FShellLiveboxFrame.cpp
- FShellLiveboxPopup.cpp
- FShellLiveboxView.cpp
+ FShell_AppWidgetProviderImpl.cpp
+ FShell_AppWidgetPopupProviderImpl.cpp
+ FShell_AppWidgetProviderInfoImpl.cpp
+ FShell_AppWidgetSizeInfoImpl.cpp
+ FShell_AppWidgetManagerImpl.cpp
+ FShell_AppWidgetProviderManagerImpl.cpp
+ FShell_AppWidgetManagerProxy.cpp
+ FShellAppWidgetProvider.cpp
+ FShellAppWidgetPopupProvider.cpp
+ FShellAppWidgetProviderInfo.cpp
+ FShellAppWidgetSizeInfo.cpp
+ FShellAppWidgetManager.cpp
+ FShellAppWidgetProviderManager.cpp
+ FShell_AppWidgetManagerIpcMessage.cpp
+ FShell_AppWidgetFrame.cpp
+ FShell_AppWidgetFrameImpl.cpp
+ FShell_AppWidgetFrameModel.cpp
+ FShell_AppWidgetFramePresenter.cpp
+ FShell_AppWidgetLayer.cpp
+ FShell_AppWidgetPopup.cpp
+ FShell_AppWidgetPopupImpl.cpp
+ FShell_AppWidgetPopupModel.cpp
+ FShell_AppWidgetPopupPresenter.cpp
+ FShell_AppWidgetPopupView.cpp
+ FShell_AppWidgetPopupViewEvent.cpp
+ FShell_AppWidgetPopupViewPresenter.cpp
+ FShell_AppWidgetView.cpp
+ FShell_AppWidgetViewImpl.cpp
+ FShell_AppWidgetViewManager.cpp
+ FShell_AppWidgetViewModel.cpp
+ FShell_AppWidgetViewPresenter.cpp
+ FShellAppWidgetFrame.cpp
+ FShellAppWidgetPopup.cpp
+ FShellAppWidgetView.cpp
)
## Definitions
//
/**
- * @file FShellLiveboxFrame.cpp
- * @brief This is the implementation for the LiveboxFrame class.
+ * @file FShellAppWidgetFrame.cpp
+ * @brief This is the implementation for the AppWidgetFrame class.
*/
#include <unique_ptr.h>
#include <FBaseSysLog.h>
-#include <FShellLiveboxFrame.h>
-#include "FShell_LiveboxFrameImpl.h"
+#include <FShellAppWidgetFrame.h>
+#include "FShell_AppWidgetFrameImpl.h"
using namespace std;
using namespace Tizen::Base;
namespace Tizen { namespace Shell
{
-LiveboxFrame::LiveboxFrame(void)
+AppWidgetFrame::AppWidgetFrame(void)
{
}
-LiveboxFrame::~LiveboxFrame(void)
+AppWidgetFrame::~AppWidgetFrame(void)
{
}
result
-LiveboxFrame::Construct(const FloatDimension& size)
+AppWidgetFrame::Construct(const FloatDimension& size)
{
SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
- unique_ptr<_LiveboxFrameImpl> pImpl(_LiveboxFrameImpl::CreateLiveboxFrameImplN(*this, null, null));
+ unique_ptr<_AppWidgetFrameImpl> pImpl(_AppWidgetFrameImpl::CreateAppWidgetFrameImplN(*this, null, null));
result r = GetLastResult();
SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
result
-LiveboxFrame::Construct(const Layout& layout, const FloatDimension& size)
+AppWidgetFrame::Construct(const Layout& layout, const FloatDimension& size)
{
SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
- unique_ptr<_LiveboxFrameImpl> pImpl(_LiveboxFrameImpl::CreateLiveboxFrameImplN(*this, &layout, &layout));
+ unique_ptr<_AppWidgetFrameImpl> pImpl(_AppWidgetFrameImpl::CreateAppWidgetFrameImplN(*this, &layout, &layout));
result r = GetLastResult();
SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r));
//
/**
- * @file FShellLiveboxManager.cpp
- * @brief This is the implementation for the LiveboxManager class.
+ * @file FShellAppWidgetManager.cpp
+ * @brief This is the implementation for the AppWidgetManager class.
*/
#include <cstdlib>
#include <FApp_AppInfo.h>
-#include <FShellLiveboxManager.h>
-#include <FShellLiveboxProviderInfo.h>
-#include <FShellILiveboxAddRequestListener.h>
-#include "FShell_LiveboxManagerImpl.h"
+#include <FShellAppWidgetManager.h>
+#include <FShellAppWidgetProviderInfo.h>
+#include <FShellIAppWidgetAddRequestListener.h>
+#include "FShell_AppWidgetManagerImpl.h"
using namespace std;
using namespace Tizen::App;
namespace Tizen { namespace Shell
{
-LiveboxManager* LiveboxManager::__pTheInstance = null;\r
+AppWidgetManager* AppWidgetManager::__pTheInstance = null;
-LiveboxManager::LiveboxManager()
- :__pLiveboxManagerImpl(null)
+AppWidgetManager::AppWidgetManager()
+ :__pAppWidgetManagerImpl(null)
{
}
-LiveboxManager::~LiveboxManager()
+AppWidgetManager::~AppWidgetManager()
{
}
-\r
-void\r
-LiveboxManager::InitSingleton(void)\r
-{\r
- std::unique_ptr<LiveboxManager> pInst(new (std::nothrow) LiveboxManager());\r
- SysTryReturnVoidResult(NID_APP, pInst, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));\r
-\r
- result r = pInst->Construct();\r
- SysTryReturnVoidResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
- __pTheInstance = pInst.release();\r
- std::atexit(DestroySingleton);\r
-}\r
-\r
-void\r
-LiveboxManager::DestroySingleton(void)\r
-{\r
- delete __pTheInstance;\r
-}\r
-\r
-LiveboxManager*\r
-LiveboxManager::GetInstance(void)\r
-{\r
- static pthread_once_t onceBlock = PTHREAD_ONCE_INIT;\r
- if (__pTheInstance == null)\r
- {\r
- ClearLastResult();\r
- pthread_once(&onceBlock, InitSingleton);\r
- result r = GetLastResult();\r
- if (IsFailed(r))\r
- {\r
- onceBlock = PTHREAD_ONCE_INIT;\r
- }\r
- }\r
- return __pTheInstance;\r
-}\r
+
+void
+AppWidgetManager::InitSingleton(void)
+{
+ std::unique_ptr<AppWidgetManager> pInst(new (std::nothrow) AppWidgetManager());
+ SysTryReturnVoidResult(NID_APP, pInst, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ result r = pInst->Construct();
+ SysTryReturnVoidResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pTheInstance = pInst.release();
+ std::atexit(DestroySingleton);
+}
+
+void
+AppWidgetManager::DestroySingleton(void)
+{
+ delete __pTheInstance;
+}
+
+AppWidgetManager*
+AppWidgetManager::GetInstance(void)
+{
+ static pthread_once_t onceBlock = PTHREAD_ONCE_INIT;
+ if (__pTheInstance == null)
+ {
+ ClearLastResult();
+ pthread_once(&onceBlock, InitSingleton);
+ result r = GetLastResult();
+ if (IsFailed(r))
+ {
+ onceBlock = PTHREAD_ONCE_INIT;
+ }
+ }
+ return __pTheInstance;
+}
result
-LiveboxManager::Construct()
+AppWidgetManager::Construct(void)
{
- SysAssert(__pLiveboxManagerImpl == null);
+ SysAssert(__pAppWidgetManagerImpl == null);
SysLog(NID_APP, "Enter.");
- __pLiveboxManagerImpl = _LiveboxManagerImpl::GetInstance();
- SysAssertf(__pLiveboxManagerImpl, "Failed to construct _LiveboxManagerImpl!!");
+ __pAppWidgetManagerImpl = _AppWidgetManagerImpl::GetInstance();
+ SysAssertf(__pAppWidgetManagerImpl, "Failed to construct _AppWidgetManagerImpl!!");
SysLog(NID_APP, "Exit.");
}
Tizen::Base::Collection::IList*
-LiveboxManager::GetLiveboxProviderInfoListN()
+AppWidgetManager::GetAppWidgetProviderInfoListN(void) const
{
- return __pLiveboxManagerImpl->GetLiveboxProviderInfoListN();
+ return __pAppWidgetManagerImpl->GetAppWidgetProviderInfoListN();
}
-LiveboxProviderInfo*
-LiveboxManager::GetLiveboxProviderInfoN(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName)
+AppWidgetProviderInfo*
+AppWidgetManager::GetAppWidgetProviderInfoN(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName) const
{
- return __pLiveboxManagerImpl->GetLiveboxProviderInfoN(appId, providerName);
+ return __pAppWidgetManagerImpl->GetAppWidgetProviderInfoN(appId, providerName);
}
-LiveboxProviderInfo*
-LiveboxManager::GetDefaultLiveboxProviderInfoN(const Tizen::App::PackageId& packageId)
+AppWidgetProviderInfo*
+AppWidgetManager::GetDefaultAppWidgetProviderInfoN(const Tizen::App::PackageId& packageId) const
{
- return __pLiveboxManagerImpl->GetDefaultLiveboxProviderInfoN(packageId);
+ return __pAppWidgetManagerImpl->GetDefaultAppWidgetProviderInfoN(packageId);
}
result
-LiveboxManager::SetLiveboxAddRequestListener(ILiveboxAddRequestListener* pListener)
+AppWidgetManager::SetAppWidgetAddRequestListener(IAppWidgetAddRequestListener* pListener)
{
- return __pLiveboxManagerImpl->SetLiveboxAddRequestListener(pListener);
+ return __pAppWidgetManagerImpl->SetAppWidgetAddRequestListener(pListener);
}
//
/**
- * @file FShellLiveboxPopup.cpp
- * @brief This is the implementation for the LiveboxPopup class.
+ * @file FShellAppWidgetPopup.cpp
+ * @brief This is the implementation for the AppWidgetPopup class.
*/
#include <unique_ptr.h>
#include <FBaseSysLog.h>
-#include <FShellLiveboxPopup.h>
-#include "FShell_LiveboxPopupImpl.h"
+#include <FShellAppWidgetPopup.h>
+#include "FShell_AppWidgetPopupImpl.h"
using namespace std;
using namespace Tizen::Base;
namespace Tizen { namespace Shell
{
-LiveboxPopup::LiveboxPopup(void)
+AppWidgetPopup::AppWidgetPopup(void)
{
}
-LiveboxPopup::~LiveboxPopup(void)
+AppWidgetPopup::~AppWidgetPopup(void)
{
}
result
-LiveboxPopup::Construct(const FloatDimension& size)
+AppWidgetPopup::Construct(const FloatDimension& size)
{
SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
- unique_ptr<_LiveboxPopupImpl> pImpl(_LiveboxPopupImpl::CreateLiveboxPopupImplN(*this, null, null));
+ unique_ptr<_AppWidgetPopupImpl> pImpl(_AppWidgetPopupImpl::CreateAppWidgetPopupImplN(*this, null, null));
result r = GetLastResult();
SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
result
-LiveboxPopup::Construct(const Layout& layout, const FloatDimension& size)
+AppWidgetPopup::Construct(const Layout& layout, const FloatDimension& size)
{
SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
- unique_ptr<_LiveboxPopupImpl> pImpl(_LiveboxPopupImpl::CreateLiveboxPopupImplN(*this, &layout, &layout));
+ unique_ptr<_AppWidgetPopupImpl> pImpl(_AppWidgetPopupImpl::CreateAppWidgetPopupImplN(*this, &layout, &layout));
result r = GetLastResult();
SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
FloatRectangle
-LiveboxPopup::GetClientAreaBounds(void) const\r
-{\r
- const _LiveboxPopupImpl* pImpl = _LiveboxPopupImpl::GetInstance(*this);
- SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");\r
-\r
- return pImpl->GetClientAreaBounds();\r
-}\r
-\r
-Canvas*\r
-LiveboxPopup::GetClientAreaCanvasN(void) const\r
-{\r
- const _LiveboxPopupImpl* pImpl = _LiveboxPopupImpl::GetInstance(*this);
- SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");\r
-\r
- Canvas* pCanvas = pImpl->GetClientAreaCanvasN();\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
-LiveboxPopup::TranslateToClientAreaPosition(const FloatPoint& controlPosition) const
-{\r
- const _LiveboxPopupImpl* pImpl = _LiveboxPopupImpl::GetInstance(*this);
- SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");\r
-\r
+AppWidgetPopup::GetClientAreaBounds(void) const
+{
+ const _AppWidgetPopupImpl* pImpl = _AppWidgetPopupImpl::GetInstance(*this);
+ SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+ return pImpl->GetClientAreaBounds();
+}
+
+Canvas*
+AppWidgetPopup::GetClientAreaCanvasN(void) const
+{
+ const _AppWidgetPopupImpl* pImpl = _AppWidgetPopupImpl::GetInstance(*this);
+ SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+ Canvas* pCanvas = pImpl->GetClientAreaCanvasN();
+ result r = GetLastResult();
+ SysTryReturn(NID_UI_CTRL, pCanvas, null, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return pCanvas;
+}
+
+FloatPoint
+AppWidgetPopup::TranslateToClientAreaPosition(const FloatPoint& controlPosition) const
+{
+ const _AppWidgetPopupImpl* pImpl = _AppWidgetPopupImpl::GetInstance(*this);
+ SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
+
return pImpl->TranslateToClientAreaPosition(controlPosition);
-}\r
-\r
+}
+
FloatPoint
-LiveboxPopup::TranslateToControlPosition(const FloatPoint& clientPosition) const
+AppWidgetPopup::TranslateToControlPosition(const FloatPoint& clientPosition) const
{
- const _LiveboxPopupImpl* pImpl = _LiveboxPopupImpl::GetInstance(*this);
+ const _AppWidgetPopupImpl* pImpl = _AppWidgetPopupImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
return pImpl->TranslateToControlPosition(clientPosition);
--- /dev/null
+//
+// 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 .cpp
+ * @brief This is the implementation for the AppWidget class.
+ */
+
+#include <FBaseSysLog.h>
+#include <FShellAppWidgetFrame.h>
+#include <FShellAppWidgetPopup.h>
+#include <FShellAppWidgetPopupProvider.h>
+
+#include "FShell_AppWidgetPopupProviderImpl.h"
+#include "FShell_AppWidgetPopupImpl.h"
+
+namespace Tizen { namespace Shell
+{
+
+using namespace Tizen::Base;
+
+
+
+AppWidgetPopupProvider::AppWidgetPopupProvider()
+{
+ SysLog(NID_APP, "");
+}
+
+AppWidgetPopupProvider::~AppWidgetPopupProvider()
+{
+ SysLog(NID_APP, "AppWidgetPopupProvider is destroyed.");
+}
+
+result
+AppWidgetPopupProvider::Construct(const String& instanceId, double x, double y)
+{
+ __pAppWidgetPopupProviderImpl = new (std::nothrow) _AppWidgetPopupProviderImpl(instanceId, x, y);
+ SysTryReturnResult(NID_APP, __pAppWidgetPopupProviderImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY]");
+
+ SysLog(NID_APP, "AppWidgetPopupProvider is constructed.");
+ return E_SUCCESS;
+}
+
+/*String
+AppWidgetPopupProvider::GetId() const
+{
+ return __pAppWidgetPopupProviderImpl->GetId();
+}*/
+
+result
+AppWidgetPopupProvider::SetAppWidgetPopup(AppWidgetPopup* pAppWidgetPopup)
+{
+ return __pAppWidgetPopupProviderImpl->SetAppWidgetPopup(pAppWidgetPopup);
+}
+
+AppWidgetPopup*
+AppWidgetPopupProvider::GetAppWidgetPopup()
+{
+ return __pAppWidgetPopupProviderImpl->GetAppWidgetPopup();
+}
+
+const AppWidgetPopup*
+AppWidgetPopupProvider::GetAppWidgetPopup() const
+{
+ return const_cast<const AppWidgetPopup*>(__pAppWidgetPopupProviderImpl->GetAppWidgetPopup());
+}
+
+result
+AppWidgetPopupProvider::RequestUpdateToAppWidget()
+{
+ return __pAppWidgetPopupProviderImpl->RequestUpdateToAppWidget();
+}
+
+}} // Tizen::Shell
--- /dev/null
+//
+// 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 FShellAppWidget.cpp
+ * @brief This is the implementation for the AppWidgetProvider class.
+ */
+
+#include <FBaseSysLog.h>
+#include <FShellAppWidgetFrame.h>
+#include <FShellAppWidgetPopup.h>
+
+#include "FShell_AppWidgetProviderImpl.h"
+#include "FShellAppWidgetProvider.h"
+
+namespace Tizen { namespace Shell
+{
+
+using namespace Tizen::Base;
+
+AppWidgetProvider::AppWidgetProvider()
+{
+}
+
+AppWidgetProvider::~AppWidgetProvider()
+{
+ SysLog(NID_APP, "AppWidgetProvider is destroyed.");
+}
+
+result
+AppWidgetProvider::Construct(const String& instanceId)
+{
+ __pAppWidgetProviderImpl = new (std::nothrow) _AppWidgetProviderImpl(instanceId);
+ SysTryReturnResult(NID_APP, __pAppWidgetProviderImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY]");
+
+ SysLog(NID_APP, "AppWidgetProvider is constructed.");
+
+ return E_SUCCESS;
+}
+
+/*String
+AppWidgetProvider::GetId() const
+{
+ return __pAppWidgetProviderImpl->GetId();
+}*/
+
+result
+AppWidgetProvider::SetAppWidgetFrame(AppWidgetFrame* pAppWidgetFrame)
+{
+ return __pAppWidgetProviderImpl->SetAppWidgetFrame(pAppWidgetFrame);
+}
+
+AppWidgetFrame*
+AppWidgetProvider::GetAppWidgetFrame()
+{
+ return __pAppWidgetProviderImpl->GetAppWidgetFrame();
+}
+
+const AppWidgetFrame*
+AppWidgetProvider::GetAppWidgetFrame() const
+{
+ return const_cast<const AppWidgetFrame*>(__pAppWidgetProviderImpl->GetAppWidgetFrame());
+}
+
+}} // Tizen::Shell
--- /dev/null
+//
+// 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 FShellAppWidgetInfo.cpp
+ * @brief This is the implementation for the AppWidgetInfo class.
+ */
+
+#include <unique_ptr.h>
+
+#include <livebox-service/livebox-service.h>
+
+#include <FBase.h>
+#include <FBaseSysLog.h>
+#include <FBase_StringConverter.h>
+#include <FShellAppWidgetProviderInfo.h>
+#include <FShellAppWidgetSizeInfo.h>
+
+#include "FShell_AppWidgetProviderInfoImpl.h"
+
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+
+namespace Tizen { namespace Shell
+{
+
+
+AppWidgetProviderInfo::AppWidgetProviderInfo(const Tizen::App::AppId& appId, const Tizen::Base::String& name)
+{
+ __pAppWidgetProviderInfoImpl = new (std::nothrow) _AppWidgetProviderInfoImpl(appId, name);
+}
+
+AppWidgetProviderInfo::AppWidgetProviderInfo(const AppWidgetProviderInfo& rhs)
+{
+ SysAssert(rhs.__pAppWidgetProviderInfoImpl);
+ __pAppWidgetProviderInfoImpl = new (std::nothrow) _AppWidgetProviderInfoImpl(rhs.__pAppWidgetProviderInfoImpl->__appId, rhs.__pAppWidgetProviderInfoImpl->__name);
+}
+
+AppWidgetProviderInfo::~AppWidgetProviderInfo()
+{
+ delete __pAppWidgetProviderInfoImpl;
+}
+
+Tizen::App::AppId
+AppWidgetProviderInfo::GetAppId() const
+{
+ SysAssert(__pAppWidgetProviderInfoImpl);
+ return __pAppWidgetProviderInfoImpl->GetAppId();
+}
+
+Tizen::Base::String
+AppWidgetProviderInfo::GetName() const
+{
+ SysAssert(__pAppWidgetProviderInfoImpl);
+ return __pAppWidgetProviderInfoImpl->GetName();
+}
+
+Tizen::Base::String
+AppWidgetProviderInfo::GetDisplayName() const
+{
+ SysAssert(__pAppWidgetProviderInfoImpl);
+ return __pAppWidgetProviderInfoImpl->GetDisplayName();
+}
+
+Tizen::Base::String
+AppWidgetProviderInfo::GetIconPath() const
+{
+ SysAssert(__pAppWidgetProviderInfoImpl);
+ return __pAppWidgetProviderInfoImpl->GetIconPath();
+}
+
+Tizen::Base::String
+AppWidgetProviderInfo::GetConfigurationAppControlAppId() const
+{
+ return __pAppWidgetProviderInfoImpl->GetConfigurationAppControlAppId();
+}
+
+Tizen::Base::Collection::IList*
+AppWidgetProviderInfo::GetSizeInfoListN() const
+{
+ SysAssert(__pAppWidgetProviderInfoImpl);
+ return __pAppWidgetProviderInfoImpl->GetSizeInfoListN();
+}
+
+bool
+AppWidgetProviderInfo::IsDefault() const
+{
+ SysAssert(__pAppWidgetProviderInfoImpl);
+ return __pAppWidgetProviderInfoImpl->IsDefault();
+}
+
+}} // Tizen::Shell
--- /dev/null
+//
+// 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 FShellAppWidgetProviderManager.cpp
+ * @brief This is the implementation for the AppWidgetProviderManager class.
+ */
+
+#include <unique_ptr.h>
+
+#include <shortcut.h>
+#include <livebox-service/livebox-service.h>
+
+#include <FBaseSysLog.h>
+#include <FBaseCol.h>
+#include <FGraphics.h>
+#include <FApp.h>
+#include <FAppPkgPackageInfo.h>
+#include <FShellAppWidgetProviderManager.h>
+#include <FShellAppWidgetProviderInfo.h>
+#include <FShellIAppWidgetProviderFactory.h>
+#include <FShellIAppWidgetPopupProviderFactory.h>
+
+#include <FApp_Types.h>
+#include <FApp_AppInfo.h>
+#include <FAppPkg_PackageManagerImpl.h>
+#include <FBase_StringConverter.h>
+
+#include "FShell_AppWidgetProviderManagerImpl.h"
+
+using namespace std;
+using namespace Tizen::App;
+using namespace Tizen::App::Package;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+
+
+namespace Tizen { namespace Shell
+{
+
+AppWidgetProviderManager::AppWidgetProviderManager()
+ :__pAppWidgetProviderManagerImpl(null)
+{
+
+}
+
+AppWidgetProviderManager::~AppWidgetProviderManager()
+{
+ SysLog(NID_APP, "AppWidgetProviderManager is destroyed.");
+}
+
+AppWidgetProviderManager*
+AppWidgetProviderManager::GetInstance()
+{
+ static AppWidgetProviderManager* pAppWidgetManager = null;
+ if( pAppWidgetManager == null)
+ {
+ pAppWidgetManager = new (std::nothrow) AppWidgetProviderManager;
+ SysTryReturn(NID_APP, pAppWidgetManager, null, E_OUT_OF_MEMORY, "E_OUT_OF_MEMORY" );
+
+ result r = pAppWidgetManager->Construct();
+// SysTryReturn(NID_APP, !IsFailed(r), null, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysAssertf(!IsFailed(r), "Failed to construct AppWidgetProviderManager!!");
+ }
+
+ return pAppWidgetManager;
+}
+
+result
+AppWidgetProviderManager::Construct()
+{
+ SysAssert(__pAppWidgetProviderManagerImpl == null);
+
+ __pAppWidgetProviderManagerImpl = _AppWidgetProviderManagerImpl::GetInstance();
+ SysAssertf(__pAppWidgetProviderManagerImpl, "Failed to construct _AppWidgetProviderManagerImpl!!");
+
+ SysLog(NID_APP, "AppWidgetProviderManager instance is constructed.");
+ return E_SUCCESS;
+}
+
+result
+AppWidgetProviderManager::SetAppWidgetProviderFactory(IAppWidgetProviderFactory& factory)
+{
+ return __pAppWidgetProviderManagerImpl->SetAppWidgetProviderFactory(factory);
+}
+
+result
+AppWidgetProviderManager::SetAppWidgetPopupProviderFactory(IAppWidgetPopupProviderFactory& factory)
+{
+ return __pAppWidgetProviderManagerImpl->SetAppWidgetPopupProviderFactory(factory);
+}
+
+result
+AppWidgetProviderManager::RequestUpdate(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Base::String& argument)
+{
+ SysLog(NID_APP, "Enter.");
+ return __pAppWidgetProviderManagerImpl->RequestUpdate(appId, providerName, argument);
+}
+
+result
+AppWidgetProviderManager::AddAppWidget(const Tizen::App::AppId& providerAppId, const Tizen::Base::String& providerName, const Tizen::Base::String& text, const Tizen::Base::String& userInfo)
+{
+ return __pAppWidgetProviderManagerImpl->AddAppWidget(providerAppId, providerName, text, userInfo);
+}
+
+}} // Tizen::Shell
//
/**
- * @file FShellLiveboxInfo.cpp
- * @brief This is the implementation for the LiveboxInfo class.
+ * @file FShellAppWidgetInfo.cpp
+ * @brief This is the implementation for the AppWidgetInfo class.
*/
#include <unique_ptr.h>
#include <FBase.h>
#include <FBaseSysLog.h>
#include <FBase_StringConverter.h>
-#include <FShellLiveboxSizeInfo.h>
+#include <FShellAppWidgetSizeInfo.h>
-#include "FShell_LiveboxSizeInfoImpl.h"
+#include "FShell_AppWidgetSizeInfoImpl.h"
using namespace Tizen::Base;
namespace Tizen { namespace Shell
{
-LiveboxSizeInfo::LiveboxSizeInfo(FloatDimension size, const String& previewImagePath)
+AppWidgetSizeInfo::AppWidgetSizeInfo(FloatDimension size, const String& previewImagePath)
{
- __pLiveboxSizeInfoImpl = new (std::nothrow) _LiveboxSizeInfoImpl(size, previewImagePath);
+ __pAppWidgetSizeInfoImpl = new (std::nothrow) _AppWidgetSizeInfoImpl(size, previewImagePath);
}
-LiveboxSizeInfo::LiveboxSizeInfo(const LiveboxSizeInfo& rhs)
+AppWidgetSizeInfo::AppWidgetSizeInfo(const AppWidgetSizeInfo& rhs)
{
- *__pLiveboxSizeInfoImpl = *rhs.__pLiveboxSizeInfoImpl;
+ *__pAppWidgetSizeInfoImpl = *rhs.__pAppWidgetSizeInfoImpl;
}
-LiveboxSizeInfo&
-LiveboxSizeInfo::operator =(const LiveboxSizeInfo& rhs)
+AppWidgetSizeInfo&
+AppWidgetSizeInfo::operator =(const AppWidgetSizeInfo& rhs)
{
- *__pLiveboxSizeInfoImpl = *rhs.__pLiveboxSizeInfoImpl;
+ *__pAppWidgetSizeInfoImpl = *rhs.__pAppWidgetSizeInfoImpl;
return *this;
}
-LiveboxSizeInfo::~LiveboxSizeInfo()
+AppWidgetSizeInfo::~AppWidgetSizeInfo()
{
}
FloatDimension
-LiveboxSizeInfo::GetSize() const
+AppWidgetSizeInfo::GetSize() const
{
- return __pLiveboxSizeInfoImpl->GetSize();
+ return __pAppWidgetSizeInfoImpl->GetSize();
}
Tizen::Base::String
-LiveboxSizeInfo::GetPreviewImagePath() const
+AppWidgetSizeInfo::GetPreviewImagePath() const
{
- return __pLiveboxSizeInfoImpl->GetPreviewImagePath();
+ return __pAppWidgetSizeInfoImpl->GetPreviewImagePath();
}
}} // Tizen::Shell
--- /dev/null
+//
+// 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 FShellAppWidgetView.cpp
+ * @brief This is the implementation for the AppWidgetView class.
+ */
+
+#include <unique_ptr.h>
+#include <FBaseSysLog.h>
+#include <FBaseString.h>
+#include <FGrpPoint.h>
+#include <FShellAppWidgetView.h>
+#include <FApp_Aul.h>
+#include "FShell_AppWidgetViewImpl.h"
+
+using namespace std;
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+
+namespace Tizen { namespace Shell
+{
+
+AppWidgetView::AppWidgetView(void)
+{
+}
+
+AppWidgetView::~AppWidgetView(void)
+{
+}
+
+result
+AppWidgetView::Construct(const AppId& appId, const String& providerName, const FloatRectangle& rect)
+{
+ return Construct(appId, providerName, rect, L"");
+}
+
+result
+AppWidgetView::Construct(const AppId& appId, const String& providerName, const FloatRectangle& rect, const String& userInfo)
+{
+ SysTryReturnResult(NID_UI_CTRL, _Aul::IsInstalled(appId) == true, E_APP_NOT_INSTALLED, "The application is not installed.");
+
+ SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
+
+ unique_ptr<_AppWidgetViewImpl> pImpl(_AppWidgetViewImpl::CreateAppWidgetViewImplN(*this));
+ result r = GetLastResult();
+ SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ r = pImpl->Initialize(appId, providerName, rect, userInfo);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ _pControlImpl = pImpl.release();
+
+ return r;
+}
+
+AppWidgetProviderInfo*
+AppWidgetView::GetAppWidgetProviderInfoN(void) const
+{
+ const _AppWidgetViewImpl* pImpl = _AppWidgetViewImpl::GetInstance(*this);
+ SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+ AppWidgetProviderInfo* pProviderInfo = pImpl->GetAppWidgetProviderInfoN();
+ result r = GetLastResult();
+ SysTryReturn(NID_UI_CTRL, pProviderInfo, null, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return pProviderInfo;
+}
+
+result
+AppWidgetView::AddAppWidgetViewEventListener(IAppWidgetViewEventListener& listener)
+{
+ _AppWidgetViewImpl* pImpl = _AppWidgetViewImpl::GetInstance(*this);
+ SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+ result r = pImpl->AddAppWidgetViewEventListener(listener);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return r;
+}
+
+result
+AppWidgetView::RemoveAppWidgetViewEventListener(IAppWidgetViewEventListener& listener)
+{
+ _AppWidgetViewImpl* pImpl = _AppWidgetViewImpl::GetInstance(*this);
+ SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+ result r = pImpl->RemoveAppWidgetViewEventListener(listener);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return r;
+}
+
+}} // Tizen::Shell
+++ /dev/null
-//
-// 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 .cpp
- * @brief This is the implementation for the Livebox class.
- */
-
-#include <FBaseSysLog.h>
-#include <FShellLiveboxFrame.h>
-#include <FShellLiveboxPopup.h>
-#include <FShellLiveboxPopupProvider.h>
-
-#include "FShell_LiveboxPopupProviderImpl.h"
-#include "FShell_LiveboxPopupImpl.h"
-
-namespace Tizen { namespace Shell
-{
-
-using namespace Tizen::Base;
-
-
-
-LiveboxPopupProvider::LiveboxPopupProvider()
-{
- SysLog(NID_APP, "");
-}
-
-LiveboxPopupProvider::~LiveboxPopupProvider()
-{
- SysLog(NID_APP, "LiveboxPopupProvider is destroyed.");
-}
-
-result
-LiveboxPopupProvider::Construct(const String& instanceId, double x, double y)
-{
- __pLiveboxPopupProviderImpl = new (std::nothrow) _LiveboxPopupProviderImpl(instanceId, x, y);
- SysTryReturnResult(NID_APP, __pLiveboxPopupProviderImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY]");
-
- SysLog(NID_APP, "LiveboxPopupProvider is constructed.");
- return E_SUCCESS;
-}
-
-/*String
-LiveboxPopupProvider::GetId() const
-{
- return __pLiveboxPopupProviderImpl->GetId();
-}*/
-
-result
-LiveboxPopupProvider::SetLiveboxPopup(LiveboxPopup* pLiveboxPopup)
-{
- return __pLiveboxPopupProviderImpl->SetLiveboxPopup(pLiveboxPopup);
-}
-
-LiveboxPopup*
-LiveboxPopupProvider::GetLiveboxPopup()
-{
- return __pLiveboxPopupProviderImpl->GetLiveboxPopup();
-}
-
-const LiveboxPopup*
-LiveboxPopupProvider::GetLiveboxPopup() const
-{
- return const_cast<const LiveboxPopup*>(__pLiveboxPopupProviderImpl->GetLiveboxPopup());
-}
-
-result
-LiveboxPopupProvider::RequestUpdateToLivebox()
-{
- return __pLiveboxPopupProviderImpl->RequestUpdateToLivebox();
-}
-
-}} // Tizen::Shell
+++ /dev/null
-//
-// 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 FShellLivebox.cpp
- * @brief This is the implementation for the LiveboxProvider class.
- */
-
-#include <FBaseSysLog.h>
-#include <FShellLiveboxFrame.h>
-#include <FShellLiveboxPopup.h>
-
-#include "FShell_LiveboxProviderImpl.h"
-#include "FShellLiveboxProvider.h"
-
-namespace Tizen { namespace Shell
-{
-
-using namespace Tizen::Base;
-
-LiveboxProvider::LiveboxProvider()
-{
-}
-
-LiveboxProvider::~LiveboxProvider()
-{
- SysLog(NID_APP, "LiveboxProvider is destroyed.");
-}
-
-result
-LiveboxProvider::Construct(const String& instanceId)
-{
- __pLiveboxProviderImpl = new (std::nothrow) _LiveboxProviderImpl(instanceId);
- SysTryReturnResult(NID_APP, __pLiveboxProviderImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY]");
-
- SysLog(NID_APP, "LiveboxProvider is constructed.");
-
- return E_SUCCESS;
-}
-
-/*String
-LiveboxProvider::GetId() const
-{
- return __pLiveboxProviderImpl->GetId();
-}*/
-
-result
-LiveboxProvider::SetLiveboxFrame(LiveboxFrame* pLiveboxFrame)
-{
- return __pLiveboxProviderImpl->SetLiveboxFrame(pLiveboxFrame);
-}
-
-LiveboxFrame*
-LiveboxProvider::GetLiveboxFrame()
-{
- return __pLiveboxProviderImpl->GetLiveboxFrame();
-}
-
-const LiveboxFrame*
-LiveboxProvider::GetLiveboxFrame() const
-{
- return const_cast<const LiveboxFrame*>(__pLiveboxProviderImpl->GetLiveboxFrame());
-}
-
-}} // Tizen::Shell
+++ /dev/null
-//
-// 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 FShellLiveboxInfo.cpp
- * @brief This is the implementation for the LiveboxInfo class.
- */
-
-#include <unique_ptr.h>
-
-#include <livebox-service/livebox-service.h>
-
-#include <FBase.h>
-#include <FBaseSysLog.h>
-#include <FBase_StringConverter.h>
-#include <FShellLiveboxProviderInfo.h>
-#include <FShellLiveboxSizeInfo.h>
-
-#include "FShell_LiveboxProviderInfoImpl.h"
-
-
-using namespace Tizen::Base;
-using namespace Tizen::Base::Collection;
-using namespace Tizen::Graphics;
-
-namespace Tizen { namespace Shell
-{
-
-
-LiveboxProviderInfo::LiveboxProviderInfo(const Tizen::App::AppId& appId, const Tizen::Base::String& name)
-{
- __pLiveboxProviderInfoImpl = new (std::nothrow) _LiveboxProviderInfoImpl(appId, name);
-}
-
-LiveboxProviderInfo::LiveboxProviderInfo(const LiveboxProviderInfo& rhs)
-{
- SysAssert(rhs.__pLiveboxProviderInfoImpl);
- __pLiveboxProviderInfoImpl = new (std::nothrow) _LiveboxProviderInfoImpl(rhs.__pLiveboxProviderInfoImpl->__appId, rhs.__pLiveboxProviderInfoImpl->__name);
-}
-
-LiveboxProviderInfo::~LiveboxProviderInfo()
-{
- delete __pLiveboxProviderInfoImpl;
-}
-
-Tizen::App::AppId
-LiveboxProviderInfo::GetAppId() const
-{
- SysAssert(__pLiveboxProviderInfoImpl);
- return __pLiveboxProviderInfoImpl->GetAppId();
-}
-
-Tizen::Base::String
-LiveboxProviderInfo::GetName() const
-{
- SysAssert(__pLiveboxProviderInfoImpl);
- return __pLiveboxProviderInfoImpl->GetName();
-}
-
-Tizen::Base::String
-LiveboxProviderInfo::GetDisplayName() const
-{
- SysAssert(__pLiveboxProviderInfoImpl);
- return __pLiveboxProviderInfoImpl->GetDisplayName();
-}
-
-Tizen::Base::String
-LiveboxProviderInfo::GetIconPath() const
-{
- SysAssert(__pLiveboxProviderInfoImpl);
- return __pLiveboxProviderInfoImpl->GetIconPath();
-}
-
-Tizen::Base::String
-LiveboxProviderInfo::GetConfigurationAppControlAppId() const
-{
- return __pLiveboxProviderInfoImpl->GetConfigurationAppControlAppId();
-}
-
-Tizen::Base::Collection::IList*
-LiveboxProviderInfo::GetSizeInfoListN() const
-{
- SysAssert(__pLiveboxProviderInfoImpl);
- return __pLiveboxProviderInfoImpl->GetSizeInfoListN();
-}
-
-bool
-LiveboxProviderInfo::IsDefault() const
-{
- SysAssert(__pLiveboxProviderInfoImpl);
- return __pLiveboxProviderInfoImpl->IsDefault();
-}
-
-}} // Tizen::Shell
+++ /dev/null
-//
-// 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 FShellLiveboxProviderManager.cpp
- * @brief This is the implementation for the LiveboxProviderManager class.
- */
-
-#include <unique_ptr.h>
-
-#include <shortcut.h>
-#include <livebox-service/livebox-service.h>
-
-#include <FBaseSysLog.h>
-#include <FBaseCol.h>
-#include <FGraphics.h>
-#include <FApp.h>
-#include <FAppPkgPackageInfo.h>
-#include <FShellLiveboxProviderManager.h>
-#include <FShellLiveboxProviderInfo.h>
-#include <FShellILiveboxProviderFactory.h>
-#include <FShellILiveboxPopupProviderFactory.h>
-
-#include <FApp_Types.h>
-#include <FApp_AppInfo.h>
-#include <FAppPkg_PackageManagerImpl.h>
-#include <FBase_StringConverter.h>
-
-#include "FShell_LiveboxProviderManagerImpl.h"
-
-using namespace std;
-using namespace Tizen::App;
-using namespace Tizen::App::Package;
-using namespace Tizen::Base;
-using namespace Tizen::Base::Collection;
-using namespace Tizen::Graphics;
-
-
-namespace Tizen { namespace Shell
-{
-
-LiveboxProviderManager::LiveboxProviderManager()
- :__pLiveboxProviderManagerImpl(null)
-{
-
-}
-
-LiveboxProviderManager::~LiveboxProviderManager()
-{
- SysLog(NID_APP, "LiveboxProviderManager is destroyed.");
-}
-
-LiveboxProviderManager*
-LiveboxProviderManager::GetInstance()
-{
- static LiveboxProviderManager* pLiveboxManager = null;
- if( pLiveboxManager == null)
- {
- pLiveboxManager = new (std::nothrow) LiveboxProviderManager;
- SysTryReturn(NID_APP, pLiveboxManager, null, E_OUT_OF_MEMORY, "E_OUT_OF_MEMORY" );
-
- result r = pLiveboxManager->Construct();
-// SysTryReturn(NID_APP, !IsFailed(r), null, r, "[%s] Propagating.", GetErrorMessage(r));
- SysAssertf(!IsFailed(r), "Failed to construct LiveboxProviderManager!!");
- }
-
- return pLiveboxManager;
-}
-
-result
-LiveboxProviderManager::Construct()
-{
- SysAssert(__pLiveboxProviderManagerImpl == null);
-
- __pLiveboxProviderManagerImpl = _LiveboxProviderManagerImpl::GetInstance();
- SysAssertf(__pLiveboxProviderManagerImpl, "Failed to construct _LiveboxProviderManagerImpl!!");
-
- SysLog(NID_APP, "LiveboxProviderManager instance is constructed.");
- return E_SUCCESS;
-}
-
-result
-LiveboxProviderManager::SetLiveboxProviderFactory(ILiveboxProviderFactory& factory)
-{
- return __pLiveboxProviderManagerImpl->SetLiveboxProviderFactory(factory);
-}
-
-result
-LiveboxProviderManager::SetLiveboxPopupProviderFactory(ILiveboxPopupProviderFactory& factory)
-{
- return __pLiveboxProviderManagerImpl->SetLiveboxPopupProviderFactory(factory);
-}
-
-result
-LiveboxProviderManager::RequestUpdate(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Base::String& argument)
-{
- SysLog(NID_APP, "Enter.");
- return __pLiveboxProviderManagerImpl->RequestUpdate(appId, providerName, argument);
-}
-
-result
-LiveboxProviderManager::AddLivebox(const Tizen::App::AppId& providerAppId, const Tizen::Base::String& providerName, const Tizen::Base::String& text, const Tizen::Base::String& userInfo)
-{
- return __pLiveboxProviderManagerImpl->AddLivebox(providerAppId, providerName, text, userInfo);
-}
-
-}} // Tizen::Shell
+++ /dev/null
-//
-// 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 FShellLiveboxView.cpp
- * @brief This is the implementation for the LiveboxView class.
- */
-
-#include <unique_ptr.h>
-#include <FBaseSysLog.h>
-#include <FBaseString.h>
-#include <FGrpPoint.h>
-#include <FShellLiveboxView.h>
-#include <FApp_Aul.h>
-#include "FShell_LiveboxViewImpl.h"
-
-using namespace std;
-using namespace Tizen::App;
-using namespace Tizen::Base;
-using namespace Tizen::Graphics;
-
-namespace Tizen { namespace Shell
-{
-
-LiveboxView::LiveboxView(void)
-{
-}
-
-LiveboxView::~LiveboxView(void)
-{
-}
-
-result
-LiveboxView::Construct(const AppId& appId, const String& providerName, const FloatRectangle& rect)
-{
- return Construct(appId, providerName, rect, L"");
-}
-
-result
-LiveboxView::Construct(const AppId& appId, const String& providerName, const FloatRectangle& rect, const String& userInfo)
-{
- SysTryReturnResult(NID_UI_CTRL, _Aul::IsInstalled(appId) == true, E_APP_NOT_INSTALLED, "The application is not installed.");
-
- SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
-
- unique_ptr<_LiveboxViewImpl> pImpl(_LiveboxViewImpl::CreateLiveboxViewImplN(*this));
- result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = pImpl->Initialize(appId, providerName, rect, userInfo);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- _pControlImpl = pImpl.release();
-
- return r;
-}
-
-}} // Tizen::Shell
// limitations under the License.
//
/**
- * @file FShell_LiveboxFrame.cpp
- * @brief This is the implementation file for the _LiveboxFrame class.
+ * @file FShell_AppWidgetFrame.cpp
+ * @brief This is the implementation file for the _AppWidgetFrame class.
*/
#include <new>
#include "FUi_UiEventManager.h"
#include "FUiAnim_DisplayManager.h"
#include "FUiAnim_RootVisualElement.h"
-#include "FShell_LiveboxFrame.h"
-#include "FShell_LiveboxFramePresenter.h"
-#include "FShell_LiveboxLayer.h"
+#include "FShell_AppWidgetFrame.h"
+#include "FShell_AppWidgetFramePresenter.h"
+#include "FShell_AppWidgetLayer.h"
using namespace std;
using namespace Tizen::Base;
namespace Tizen { namespace Shell
{
-_LiveboxFrame::_LiveboxFrame(void)
- : __pLiveboxFramePresenter(new (std::nothrow) _LiveboxFramePresenter(*this))
- , __pLiveboxLayer(null)
- , __pLiveboxFrameRootVisualElement(null)
+_AppWidgetFrame::_AppWidgetFrame(void)
+ : __pAppWidgetFramePresenter(new (std::nothrow) _AppWidgetFramePresenter(*this))
+ , __pAppWidgetLayer(null)
+ , __pAppWidgetFrameRootVisualElement(null)
, __pEventManager(null)
{
- SysTryReturnVoidResult(NID_UI_CTRL, __pLiveboxFramePresenter, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, __pAppWidgetFramePresenter, 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.");
SysTryReturnVoidResult(NID_UI_CTRL, __pEventManager, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
}
-_LiveboxFrame::~_LiveboxFrame(void)
+_AppWidgetFrame::~_AppWidgetFrame(void)
{
if (__pEventManager)
{
__pEventManager->UnregisterTouchEventHandler(*this);
}
- __pLiveboxLayer = null;
- __pLiveboxFrameRootVisualElement = null;
+ __pAppWidgetLayer = null;
+ __pAppWidgetFrameRootVisualElement = null;
}
-_LiveboxFrame*
-_LiveboxFrame::CreateLiveboxFrameN(void)
+_AppWidgetFrame*
+_AppWidgetFrame::CreateAppWidgetFrameN(void)
{
- unique_ptr<_LiveboxFrame> pLiveboxFrame(new (std::nothrow) _LiveboxFrame());
- SysTryReturn(NID_UI_CTRL, pLiveboxFrame, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ unique_ptr<_AppWidgetFrame> pAppWidgetFrame(new (std::nothrow) _AppWidgetFrame());
+ SysTryReturn(NID_UI_CTRL, pAppWidgetFrame, 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));
- pLiveboxFrame->AcquireHandle();
+ pAppWidgetFrame->AcquireHandle();
SetLastResult(E_SUCCESS);
- return pLiveboxFrame.release();
+ return pAppWidgetFrame.release();
}
result
-_LiveboxFrame::Initialize(const FloatDimension& size)
+_AppWidgetFrame::Initialize(const FloatDimension& size)
{
result r = E_SUCCESS;
const float DEFAULT_WIDTH = 172.0f;
const float DEFAULT_HEIGHT = 172.0f;
- FloatDimension liveboxSize(size);
- if (liveboxSize.width <= 0 )
+ FloatDimension appwidgetSize(size);
+ if (appwidgetSize.width <= 0 )
{
- liveboxSize.width = DEFAULT_WIDTH;
+ appwidgetSize.width = DEFAULT_WIDTH;
}
- if (liveboxSize.height <= 0 )
+ if (appwidgetSize.height <= 0 )
{
- liveboxSize.height = DEFAULT_HEIGHT;
+ appwidgetSize.height = DEFAULT_HEIGHT;
}
SetSystemWindow(true);
- __liveboxSize = size;
+ __appwidgetSize = size;
r = CreateRootVisualElement();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- FloatRectangle bounds(0.0f, 0.0f, liveboxSize.width, liveboxSize.height);
+ FloatRectangle bounds(0.0f, 0.0f, appwidgetSize.width, appwidgetSize.height);
r = SetBounds(bounds);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- r = __pLiveboxFramePresenter->Initialize();
+ r = __pAppWidgetFramePresenter->Initialize();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- __pLiveboxLayer->SetLayerBounds(bounds);
- __pLiveboxLayer->SetShowState(false);
+ __pAppWidgetLayer->SetLayerBounds(bounds);
+ __pAppWidgetLayer->SetShowState(false);
- __pLiveboxFrameRootVisualElement->SetImplicitAnimationEnabled(false);
- __pLiveboxFrameRootVisualElement->SetName(L"_LiveboxFrame");
- __pLiveboxFrameRootVisualElement->SetBounds(bounds);
- __pLiveboxFrameRootVisualElement->SetShowState(false);
+ __pAppWidgetFrameRootVisualElement->SetImplicitAnimationEnabled(false);
+ __pAppWidgetFrameRootVisualElement->SetName(L"_AppWidgetFrame");
+ __pAppWidgetFrameRootVisualElement->SetBounds(bounds);
+ __pAppWidgetFrameRootVisualElement->SetShowState(false);
SetBackgroundColor(Color(0, 0, 0, 0));
}
result
-_LiveboxFrame::SetProviderId(const String& providerId)
+_AppWidgetFrame::SetProviderId(const String& providerId)
{
- __pLiveboxFramePresenter->SetProviderId(providerId);
+ __pAppWidgetFramePresenter->SetProviderId(providerId);
- result r = __pLiveboxLayer->SetProviderId(providerId);
+ result r = __pAppWidgetLayer->SetProviderId(providerId);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return r;
}
String
-_LiveboxFrame::GetProviderId(void) const
+_AppWidgetFrame::GetProviderId(void) const
{
- return __pLiveboxFramePresenter->GetProviderId();
+ return __pAppWidgetFramePresenter->GetProviderId();
}
result
-_LiveboxFrame::SetLayerShowState(bool showState)
+_AppWidgetFrame::SetLayerShowState(bool showState)
{
result r = E_SUCCESS;
- if (__pLiveboxFrameRootVisualElement)
+ if (__pAppWidgetFrameRootVisualElement)
{
- _LiveboxLayer* pLayer = dynamic_cast<_LiveboxLayer*>(__pLiveboxFrameRootVisualElement->GetNativeLayer());
+ _AppWidgetLayer* pLayer = dynamic_cast<_AppWidgetLayer*>(__pAppWidgetFrameRootVisualElement->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));
- __pLiveboxFrameRootVisualElement->SetShowState(showState);
+ __pAppWidgetFrameRootVisualElement->SetShowState(showState);
}
return r;
}
result
-_LiveboxFrame::SetLayerBounds(const FloatRectangle& bounds)
+_AppWidgetFrame::SetLayerBounds(const FloatRectangle& bounds)
{
result r = E_SUCCESS;
- if (__pLiveboxFrameRootVisualElement)
+ if (__pAppWidgetFrameRootVisualElement)
{
- _LiveboxLayer* pLayer = dynamic_cast<_LiveboxLayer*>(__pLiveboxFrameRootVisualElement->GetNativeLayer());
+ _AppWidgetLayer* pLayer = dynamic_cast<_AppWidgetLayer*>(__pAppWidgetFrameRootVisualElement->GetNativeLayer());
r = GetLastResult();
SysTryReturn(NID_UI_CTRL, pLayer, r, r, "[%s] Propagating.", GetErrorMessage(r));
pLayer->SetLayerBounds(bounds);
- __pLiveboxFrameRootVisualElement->SetBounds(bounds);
+ __pAppWidgetFrameRootVisualElement->SetBounds(bounds);
}
return r;
}
result
-_LiveboxFrame::CreateLayer(void)
+_AppWidgetFrame::CreateLayer(void)
{
- unique_ptr<_LiveboxLayer> pLayer(new (std::nothrow) _LiveboxLayer(__liveboxSize));
+ unique_ptr<_AppWidgetLayer> pLayer(new (std::nothrow) _AppWidgetLayer(__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));
- __pLiveboxLayer = pLayer.release();
- __pLiveboxFrameRootVisualElement = __pLiveboxLayer->GetRootVisualElement();
+ __pAppWidgetLayer = pLayer.release();
+ __pAppWidgetFrameRootVisualElement = __pAppWidgetLayer->GetRootVisualElement();
- SetLayer(*__pLiveboxLayer);
- SetRootVisualElement(*__pLiveboxFrameRootVisualElement);
+ SetLayer(*__pAppWidgetLayer);
+ SetRootVisualElement(*__pAppWidgetFrameRootVisualElement);
return r;
}
void
-_LiveboxFrame::OnActivated(void)
+_AppWidgetFrame::OnActivated(void)
{
result r = SetLayerShowState(true);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
void
-_LiveboxFrame::OnDeactivated(void)
+_AppWidgetFrame::OnDeactivated(void)
{
}
void
-_LiveboxFrame::OnBoundsChanged(void)
+_AppWidgetFrame::OnBoundsChanged(void)
{
FloatRectangle bounds = GetBoundsF();
}
void
-_LiveboxFrame::OnDraw(void)
+_AppWidgetFrame::OnDraw(void)
{
- if (__pLiveboxFramePresenter)
+ if (__pAppWidgetFramePresenter)
{
- __pLiveboxFramePresenter->Draw();
+ __pAppWidgetFramePresenter->Draw();
}
}
// limitations under the License.
//
/**
- * @file FShell_LiveboxFrame.h
- * @brief This is the header file for the _LiveboxFrame class.
+ * @file FShell_AppWidgetFrame.h
+ * @brief This is the header file for the _AppWidgetFrame class.
*
- * This header file contains the declarations of the %_LiveboxFrame class.
+ * This header file contains the declarations of the %_AppWidgetFrame class.
*/
-#ifndef _FSHELL_INTERNAL_LIVEBOX_FRAME_H_
-#define _FSHELL_INTERNAL_LIVEBOX_FRAME_H_
+#ifndef _FSHELL_INTERNAL_APPWIDGET_FRAME_H_
+#define _FSHELL_INTERNAL_APPWIDGET_FRAME_H_
#include <unique_ptr.h>
#include <FBaseString.h>
namespace Tizen { namespace Shell
{
-class _LiveboxFramePresenter;
-class _LiveboxLayer;
+class _AppWidgetFramePresenter;
+class _AppWidgetLayer;
/**
- * @class _LiveboxFrame
+ * @class _AppWidgetFrame
* @brief
* @since 2.1
*/
-class _LiveboxFrame
+class _AppWidgetFrame
: public Tizen::Ui::_Window
{
public:
- static _LiveboxFrame* CreateLiveboxFrameN(void);
- virtual ~_LiveboxFrame(void);
+ static _AppWidgetFrame* CreateAppWidgetFrameN(void);
+ virtual ~_AppWidgetFrame(void);
result Initialize(const Tizen::Graphics::FloatDimension& size);
result SetProviderId(const Tizen::Base::String& providerId);
Tizen::Base::String GetProviderId(void) const;
protected:
- _LiveboxFrame(void);
+ _AppWidgetFrame(void);
private:
- _LiveboxFrame(const _LiveboxFrame& rhs);
- _LiveboxFrame& operator =(const _LiveboxFrame& rhs);
+ _AppWidgetFrame(const _AppWidgetFrame& rhs);
+ _AppWidgetFrame& operator =(const _AppWidgetFrame& rhs);
result SetLayerShowState(bool showState);
result SetLayerBounds(const Tizen::Graphics::FloatRectangle& bounds);
virtual void OnDraw(void);
private:
- std::unique_ptr<_LiveboxFramePresenter> __pLiveboxFramePresenter;
- _LiveboxLayer* __pLiveboxLayer;
- Tizen::Ui::Animations::_RootVisualElement* __pLiveboxFrameRootVisualElement;
+ std::unique_ptr<_AppWidgetFramePresenter> __pAppWidgetFramePresenter;
+ _AppWidgetLayer* __pAppWidgetLayer;
+ Tizen::Ui::Animations::_RootVisualElement* __pAppWidgetFrameRootVisualElement;
Tizen::Ui::_IUiEventManager* __pEventManager;
- Tizen::Graphics::FloatDimension __liveboxSize;
-}; // _LiveboxFrame
+ Tizen::Graphics::FloatDimension __appwidgetSize;
+}; // _AppWidgetFrame
}} // Tizen::Shell
-#endif // _FSHELL_INTERNAL_LIVEBOX_FRAME_H_
+#endif // _FSHELL_INTERNAL_APPWIDGET_FRAME_H_
--- /dev/null
+//
+// 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.
+//
+
+#include <new>
+#include <unique_ptr.h>
+#include <FBaseSysLog.h>
+#include "FShell_AppWidgetFrameImpl.h"
+
+using namespace std;
+using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
+
+namespace Tizen { namespace Shell
+{
+
+const _AppWidgetFrameImpl*
+_AppWidgetFrameImpl::GetInstance(const AppWidgetFrame& appwidgetFrame)
+{
+ return static_cast<const _AppWidgetFrameImpl*>(_ControlImpl::GetInstance(appwidgetFrame));
+}
+
+_AppWidgetFrameImpl*
+_AppWidgetFrameImpl::GetInstance(AppWidgetFrame& appwidgetFrame)
+{
+ return static_cast<_AppWidgetFrameImpl*>(_ControlImpl::GetInstance(appwidgetFrame));
+}
+
+_AppWidgetFrameImpl*
+_AppWidgetFrameImpl::CreateAppWidgetFrameImplN(AppWidgetFrame& appwidgetFrame, const Layout* pPortraitLayout, const Layout* pLandscapeLayout)
+{
+ unique_ptr<_AppWidgetFrame> pCore(_AppWidgetFrame::CreateAppWidgetFrameN());
+ result r = GetLastResult();
+ SysTryReturn(NID_UI_CTRL, pCore, null, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ unique_ptr<_AppWidgetFrameImpl> pImpl(new (std::nothrow) _AppWidgetFrameImpl(&appwidgetFrame, pCore.get(), pPortraitLayout, pLandscapeLayout));
+ SysTryReturn(NID_UI_CTRL, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+
+ pCore.release();
+
+ r = GetLastResult();
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return pImpl.release();
+}
+
+_AppWidgetFrameImpl::_AppWidgetFrameImpl(AppWidgetFrame* pPublic, _AppWidgetFrame* pCore, const Layout* pPortraitLayout, const Layout* pLandscapeLayout)
+ : _WindowImpl(pPublic, pCore, pPortraitLayout, pLandscapeLayout)
+{
+}
+
+_AppWidgetFrameImpl::~_AppWidgetFrameImpl(void)
+{
+}
+
+const char*
+_AppWidgetFrameImpl::GetPublicClassName(void) const
+{
+ return "Tizen::Shell::AppWidgetFrame";
+}
+
+const AppWidgetFrame&
+_AppWidgetFrameImpl::GetPublic(void) const
+{
+ return static_cast<const AppWidgetFrame&>(_ControlImpl::GetPublic());
+}
+
+AppWidgetFrame&
+_AppWidgetFrameImpl::GetPublic(void)
+{
+ return static_cast<AppWidgetFrame&>(_ControlImpl::GetPublic());
+}
+
+const _AppWidgetFrame&
+_AppWidgetFrameImpl::GetCore(void) const
+{
+ return static_cast<const _AppWidgetFrame&>(_ControlImpl::GetCore());
+}
+
+_AppWidgetFrame&
+_AppWidgetFrameImpl::GetCore(void)
+{
+ return static_cast<_AppWidgetFrame&>(_ControlImpl::GetCore());
+}
+
+result
+_AppWidgetFrameImpl::Initialize(const FloatDimension& size)
+{
+ result r = GetCore().Initialize(size);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return r;
+}
+
+result
+_AppWidgetFrameImpl::SetProviderId(const String& providerId)
+{
+ result r = GetCore().SetProviderId(providerId);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return r;
+}
+
+}} // Tizen::Shell
--- /dev/null
+//
+// 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.
+//
+#ifndef _FSHELL_INTERNAL_APPWIDGET_FRAME_IMPL_H_
+#define _FSHELL_INTERNAL_APPWIDGET_FRAME_IMPL_H_
+
+#include <FShellAppWidgetFrame.h>
+#include "FUi_WindowImpl.h"
+#include "FShell_AppWidgetFrame.h"
+
+namespace Tizen { namespace Ui
+{
+class Layout;
+}} // Tizen::Ui
+
+namespace Tizen { namespace Shell
+{
+
+class _AppWidgetFrameImpl
+ : public Tizen::Ui::_WindowImpl
+{
+public:
+ static _AppWidgetFrameImpl* CreateAppWidgetFrameImplN(AppWidgetFrame& appwidgetFrame, const Tizen::Ui::Layout* pPortraitLayout, const Tizen::Ui::Layout* pLandscapeLayout);
+ static const _AppWidgetFrameImpl* GetInstance(const AppWidgetFrame& appwidgetFrame);
+ static _AppWidgetFrameImpl* GetInstance(AppWidgetFrame& appwidgetFrame);
+
+ virtual ~_AppWidgetFrameImpl(void);
+
+ virtual const char* GetPublicClassName(void) const;
+ virtual const AppWidgetFrame& GetPublic(void) const;
+ virtual AppWidgetFrame& GetPublic(void);
+ virtual const _AppWidgetFrame& GetCore(void) const;
+ virtual _AppWidgetFrame& GetCore(void);
+
+ result Initialize(const Tizen::Graphics::FloatDimension& size);
+ result SetProviderId(const Tizen::Base::String& providerId);
+
+protected:
+ _AppWidgetFrameImpl(AppWidgetFrame* pPublic, _AppWidgetFrame* pCore, const Tizen::Ui::Layout* pPortraitLayout, const Tizen::Ui::Layout* pLandscapeLayout);
+
+private:
+ _AppWidgetFrameImpl(const _AppWidgetFrameImpl& rhs);
+ _AppWidgetFrameImpl& operator =(const _AppWidgetFrameImpl& rhs);
+}; // _AppWidgetFrameImpl
+
+}} // Tizen::Shell::Ui::Controls
+
+#endif // _FSHELL_INTERNAL_APPWIDGET_FRAME_IMPL_H_
// limitations under the License.
//
/**
- * @file FShell_LiveboxFrameModel.cpp
- * @brief This is the implementation file for the _LiveboxFrameModel class.
+ * @file FShell_AppWidgetFrameModel.cpp
+ * @brief This is the implementation file for the _AppWidgetFrameModel class.
*/
#include <FBaseSysLog.h>
-#include "FShell_LiveboxFrameModel.h"
+#include "FShell_AppWidgetFrameModel.h"
using namespace Tizen::Base;
namespace Tizen { namespace Shell
{
-_LiveboxFrameModel::_LiveboxFrameModel(void)
+_AppWidgetFrameModel::_AppWidgetFrameModel(void)
{
}
-_LiveboxFrameModel::~_LiveboxFrameModel(void)
+_AppWidgetFrameModel::~_AppWidgetFrameModel(void)
{
}
void
-_LiveboxFrameModel::SetProviderId(const String& providerId)
+_AppWidgetFrameModel::SetProviderId(const String& providerId)
{
__providerId = providerId;
}
String
-_LiveboxFrameModel::GetProviderId(void) const
+_AppWidgetFrameModel::GetProviderId(void) const
{
return __providerId;
}
// limitations under the License.
//
/**
- * @file FShell_LiveboxFrameModel.h
- * @brief This is the header file for the _LiveboxFrameModel class.
+ * @file FShell_AppWidgetFrameModel.h
+ * @brief This is the header file for the _AppWidgetFrameModel class.
*
- * This header file contains the declarations of the %_LiveboxFrameModel class.
+ * This header file contains the declarations of the %_AppWidgetFrameModel class.
*/
-#ifndef _FSHELL_INTERNAL_LIVEBOX_FRAME_MODEL_H_
-#define _FSHELL_INTERNAL_LIVEBOX_FRAME_MODEL_H_
+#ifndef _FSHELL_INTERNAL_APPWIDGET_FRAME_MODEL_H_
+#define _FSHELL_INTERNAL_APPWIDGET_FRAME_MODEL_H_
#include <FBaseObject.h>
#include <FBaseString.h>
namespace Tizen { namespace Shell
{
-class _LiveboxFrameModel
+class _AppWidgetFrameModel
: public Tizen::Base::Object
{
public:
- _LiveboxFrameModel(void);
- virtual ~_LiveboxFrameModel(void);
+ _AppWidgetFrameModel(void);
+ virtual ~_AppWidgetFrameModel(void);
public:
void SetProviderId(const Tizen::Base::String& providerId);
Tizen::Base::String GetProviderId(void) const;
private:
- _LiveboxFrameModel(const _LiveboxFrameModel& rhs);
- _LiveboxFrameModel& operator =(const _LiveboxFrameModel& rhs);
+ _AppWidgetFrameModel(const _AppWidgetFrameModel& rhs);
+ _AppWidgetFrameModel& operator =(const _AppWidgetFrameModel& rhs);
private:
Tizen::Base::String __providerId;
-}; // _LiveboxFrameModel
+}; // _AppWidgetFrameModel
}} // Tizen::Shell
-#endif // _FSHELL_INTERNAL_LIVEBOX_FRAME_MODEL_H_
+#endif // _FSHELL_INTERNAL_APPWIDGET_FRAME_MODEL_H_
// limitations under the License.
//
/**
- * @file FShell_LiveboxFramePresenter.cpp
- * @brief This is the implementation file for the _LiveboxFramePresenter class.
+ * @file FShell_AppWidgetFramePresenter.cpp
+ * @brief This is the implementation file for the _AppWidgetFramePresenter class.
*/
#include <new>
#include <FBaseSysLog.h>
-#include "FShell_LiveboxFramePresenter.h"
-#include "FShell_LiveboxFrame.h"
-#include "FShell_LiveboxFrameModel.h"
+#include "FShell_AppWidgetFramePresenter.h"
+#include "FShell_AppWidgetFrame.h"
+#include "FShell_AppWidgetFrameModel.h"
using namespace Tizen::Base;
using namespace Tizen::Graphics;
namespace Tizen { namespace Shell
{
-_LiveboxFramePresenter::_LiveboxFramePresenter(const _LiveboxFrame& liveboxFrame)
- : __pLiveboxFrame(null)
- , __pLiveboxFrameModel(new (std::nothrow) _LiveboxFrameModel)
+_AppWidgetFramePresenter::_AppWidgetFramePresenter(const _AppWidgetFrame& appwidgetFrame)
+ : __pAppWidgetFrame(null)
+ , __pAppWidgetFrameModel(new (std::nothrow) _AppWidgetFrameModel)
{
- __pLiveboxFrame = const_cast <_LiveboxFrame*>(&liveboxFrame);
+ __pAppWidgetFrame = const_cast <_AppWidgetFrame*>(&appwidgetFrame);
}
-_LiveboxFramePresenter::~_LiveboxFramePresenter(void)
+_AppWidgetFramePresenter::~_AppWidgetFramePresenter(void)
{
- __pLiveboxFrame = null;
+ __pAppWidgetFrame = null;
}
result
-_LiveboxFramePresenter::Initialize(void)
+_AppWidgetFramePresenter::Initialize(void)
{
result r = E_SUCCESS;
}
void
-_LiveboxFramePresenter::SetProviderId(const String& providerId)
+_AppWidgetFramePresenter::SetProviderId(const String& providerId)
{
- __pLiveboxFrameModel->SetProviderId(providerId);
+ __pAppWidgetFrameModel->SetProviderId(providerId);
}
String
-_LiveboxFramePresenter::GetProviderId(void) const
+_AppWidgetFramePresenter::GetProviderId(void) const
{
- return __pLiveboxFrameModel->GetProviderId();
+ return __pAppWidgetFrameModel->GetProviderId();
}
void
-_LiveboxFramePresenter::Draw(void)
+_AppWidgetFramePresenter::Draw(void)
{
}
// limitations under the License.
//
/**
- * @file FShell_LiveboxFramePresenter.h
- * @brief This is the header file for the _LiveboxFramePresenter class.
+ * @file FShell_AppWidgetFramePresenter.h
+ * @brief This is the header file for the _AppWidgetFramePresenter class.
*
- * This header file contains the declarations of the %_LiveboxFramePresenter class.
+ * This header file contains the declarations of the %_AppWidgetFramePresenter class.
*/
-#ifndef _FSHELL_INTERNAL_LIVEBOX_FRAME_PRESENTER_H_
-#define _FSHELL_INTERNAL_LIVEBOX_FRAME_PRESENTER_H_
+#ifndef _FSHELL_INTERNAL_APPWIDGET_FRAME_PRESENTER_H_
+#define _FSHELL_INTERNAL_APPWIDGET_FRAME_PRESENTER_H_
#include <unique_ptr.h>
namespace Tizen { namespace Shell
{
-class _LiveboxFrame;
-class _LiveboxFrameModel;
+class _AppWidgetFrame;
+class _AppWidgetFrameModel;
-class _LiveboxFramePresenter
+class _AppWidgetFramePresenter
{
public:
- _LiveboxFramePresenter(const _LiveboxFrame& liveboxFrame);
- virtual ~_LiveboxFramePresenter(void);
+ _AppWidgetFramePresenter(const _AppWidgetFrame& appwidgetFrame);
+ virtual ~_AppWidgetFramePresenter(void);
result Initialize(void);
void SetProviderId(const Tizen::Base::String& providerId);
void Draw(void);
private:
- _LiveboxFramePresenter(const _LiveboxFramePresenter& rhs);
- _LiveboxFramePresenter& operator =(const _LiveboxFramePresenter& rhs);
+ _AppWidgetFramePresenter(const _AppWidgetFramePresenter& rhs);
+ _AppWidgetFramePresenter& operator =(const _AppWidgetFramePresenter& rhs);
private:
- _LiveboxFrame* __pLiveboxFrame;
- std::unique_ptr<_LiveboxFrameModel> __pLiveboxFrameModel;
-}; // _LiveboxFramePresenter
+ _AppWidgetFrame* __pAppWidgetFrame;
+ std::unique_ptr<_AppWidgetFrameModel> __pAppWidgetFrameModel;
+}; // _AppWidgetFramePresenter
}} // Tizen::Shell
-#endif // _FSHELL_INTERNAL_LIVEBOX_FRAME_PRESENTER_H_
+#endif // _FSHELL_INTERNAL_APPWIDGET_FRAME_PRESENTER_H_
// limitations under the License.
//
/**
- * @file FShell_LiveboxLayer.cpp
- * @brief This is the implementation file for the _LiveboxLayer class.
+ * @file FShell_AppWidgetLayer.cpp
+ * @brief This is the implementation file for the _AppWidgetLayer class.
*/
#include <new>
#include <FBase_StringConverter.h>
#include <FGrpRectangle.h>
#include "FUi_Window.h"
-#include "FShell_LiveboxLayer.h"
-#include "FShell_LiveboxProviderManagerImpl.h"
+#include "FShell_AppWidgetLayer.h"
+#include "FShell_AppWidgetProviderManagerImpl.h"
using namespace std;
using namespace Tizen::Base;
void*
AllocRenderBuffer(void* pData, int size)
{
- _LiveboxLayer* pLiveboxLayer = static_cast<_LiveboxLayer*>(pData);
- SysTryReturn(NID_UI_CTRL, pLiveboxLayer, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ _AppWidgetLayer* pAppWidgetLayer = static_cast<_AppWidgetLayer*>(pData);
+ SysTryReturn(NID_UI_CTRL, pAppWidgetLayer, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- return pLiveboxLayer->AllocCanvas(size);
+ return pAppWidgetLayer->AllocCanvas(size);
}
void
{
SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- _LiveboxLayer* pLiveboxLayer = static_cast<_LiveboxLayer*>(pData);
- SysTryReturnVoidResult(NID_UI_CTRL, pLiveboxLayer, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ _AppWidgetLayer* pAppWidgetLayer = static_cast<_AppWidgetLayer*>(pData);
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidgetLayer, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- pLiveboxLayer->FreeCanvas(pCanvas);
+ pAppWidgetLayer->FreeCanvas(pCanvas);
}
void
PostRender(void* pData, Evas* pEvas, void* pEventInfo)
{
- _LiveboxLayer* pLiveboxLayer = static_cast<_LiveboxLayer*>(pData);
- SysTryReturnVoidResult(NID_UI_CTRL, pLiveboxLayer, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ _AppWidgetLayer* pAppWidgetLayer = static_cast<_AppWidgetLayer*>(pData);
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidgetLayer, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- pLiveboxLayer->OnRendered();
+ pAppWidgetLayer->OnRendered();
}
}
namespace Tizen { namespace Shell
{
-_LiveboxLayer::_LiveboxLayer(const FloatDimension& size)
+_AppWidgetLayer::_AppWidgetLayer(const FloatDimension& size)
: __isReleased(false)
, __size(size)
, __pEcoreEvas(null)
{
}
-_LiveboxLayer::~_LiveboxLayer(void)
+_AppWidgetLayer::~_AppWidgetLayer(void)
{
__pRenderBuffer = null;
__pixmapId = -1;
}
result
-_LiveboxLayer::OnConstructed(void)
+_AppWidgetLayer::OnConstructed(void)
{
result r = E_SUCCESS;
}
result
-_LiveboxLayer::SetProviderId(const String& providerId)
+_AppWidgetLayer::SetProviderId(const String& providerId)
{
__providerId = providerId;
}
String
-_LiveboxLayer::GetProviderId(void) const
+_AppWidgetLayer::GetProviderId(void) const
{
return __providerId;
}
int
-_LiveboxLayer::GetPixmapId(void) const
+_AppWidgetLayer::GetPixmapId(void) const
{
return __pixmapId;
}
void
-_LiveboxLayer::SetLayerBounds(const FloatRectangle& bounds)
+_AppWidgetLayer::SetLayerBounds(const FloatRectangle& bounds)
{
__size = FloatDimension(bounds.width, bounds.height);
}
void*
-_LiveboxLayer::AllocCanvas(int size)
+_AppWidgetLayer::AllocCanvas(int size)
{
SysTryReturn(NID_UI_CTRL, size > 0, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
}
void
-_LiveboxLayer::FreeCanvas(void* pCanvas)
+_AppWidgetLayer::FreeCanvas(void* pCanvas)
{
if (!__isReleased)
{
}
result
-_LiveboxLayer::SyncPixmap(const FloatDimension& size)
+_AppWidgetLayer::SyncPixmap(const FloatDimension& size)
{
SysTryReturn(NID_UI_CTRL, __pRenderBuffer, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
}
void
-_LiveboxLayer::OnRendered(void)
+_AppWidgetLayer::OnRendered(void)
{
if (__pixmapId == -1)
{
}
result
-_LiveboxLayer::RegisterTouchEventListener(void)
+_AppWidgetLayer::RegisterTouchEventListener(void)
{
- result r = _LiveboxProviderManagerImpl::GetInstance()->SetLiveboxTouchEventListener(__providerId, *this);
+ result r = _AppWidgetProviderManagerImpl::GetInstance()->SetAppWidgetTouchEventListener(__providerId, *this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return r;
}
int
-_LiveboxLayer::AcquirePixmap(void)
+_AppWidgetLayer::AcquirePixmap(void)
{
SysTryReturn(NID_UI_CTRL, !__providerId.IsEmpty(), -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
int pixmapId = -1;
- result r = _LiveboxProviderManagerImpl::GetInstance()->RequestSharedMemoryId(__providerId, __size.width, __size.height, pixmapId);
+ result r = _AppWidgetProviderManagerImpl::GetInstance()->RequestSharedMemoryId(__providerId, __size.width, __size.height, pixmapId);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r));
SysLog(NID_UI_CTRL, "pixmapId(%d) size(%d %d)", pixmapId, __size.width, __size.height);
}
result
-_LiveboxLayer::Sync(const FloatDimension& size)
+_AppWidgetLayer::Sync(const FloatDimension& size)
{
SysTryReturn(NID_UI_CTRL, !__providerId.IsEmpty(), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- result r = _LiveboxProviderManagerImpl::GetInstance()->RequestSyncSharedMemory(__providerId, size.width, size.height);
+ result r = _AppWidgetProviderManagerImpl::GetInstance()->RequestSyncSharedMemory(__providerId, size.width, size.height);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return r;
}
void
-_LiveboxLayer::ReleasePixmap(void)
+_AppWidgetLayer::ReleasePixmap(void)
{
SysTryReturnVoidResult(NID_UI_CTRL, !__providerId.IsEmpty(), E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- _LiveboxProviderManagerImpl::GetInstance()->RequestReleaseSharedMemory(__providerId);
+ _AppWidgetProviderManagerImpl::GetInstance()->RequestReleaseSharedMemory(__providerId);
}
int
-_LiveboxLayer::OnTouchEventRecevied(int eventType, double timestamp, double x, double y)
+_AppWidgetLayer::OnTouchEventRecevied(int eventType, double timestamp, double x, double y)
{
int xPos = __size.width * x;
int yPos = __size.height * y;
// limitations under the License.
//
/**
- * @file FShell_LiveboxFrame.h
- * @brief This is the header file for the _LiveboxLayer class.
+ * @file FShell_AppWidgetFrame.h
+ * @brief This is the header file for the _AppWidgetLayer class.
*
- * This header file contains the declarations of the %_LiveboxLayer class.
+ * This header file contains the declarations of the %_AppWidgetLayer class.
*/
-#ifndef _FSHELL_INTERNAL_LIVEBOX_LAYER_H_
-#define _FSHELL_INTERNAL_LIVEBOX_LAYER_H_
+#ifndef _FSHELL_INTERNAL_APPWIDGET_LAYER_H_
+#define _FSHELL_INTERNAL_APPWIDGET_LAYER_H_
#include <unique_ptr.h>
#include <Ecore_Evas.h>
#include <FBaseString.h>
#include "FUiAnim_EflLayer.h"
-#include "FShell_ILiveboxTouchEventListener.h"
+#include "FShell_IAppWidgetTouchEventListener.h"
namespace Tizen { namespace Ui
{
{
/**
- * @class _LiveboxLayer
+ * @class _AppWidgetLayer
* @brief
* @since 2.1
*/
-class _LiveboxLayer
+class _AppWidgetLayer
: public Tizen::Ui::Animations::_EflLayer
- , public Tizen::Shell::_ILiveboxTouchEventListener
+ , public Tizen::Shell::_IAppWidgetTouchEventListener
{
public:
- _LiveboxLayer(const Tizen::Graphics::FloatDimension& size);
- virtual ~_LiveboxLayer(void);
+ _AppWidgetLayer(const Tizen::Graphics::FloatDimension& size);
+ virtual ~_AppWidgetLayer(void);
virtual result OnConstructed(void);
virtual int OnTouchEventRecevied(int eventType, double timestamp, double x, double y);
private:
- _LiveboxLayer(const _LiveboxLayer& rhs);
- _LiveboxLayer& operator =(const _LiveboxLayer& rhs);
+ _AppWidgetLayer(const _AppWidgetLayer& rhs);
+ _AppWidgetLayer& operator =(const _AppWidgetLayer& rhs);
protected:
bool __isReleased;
}} // Tizen::Shell
-#endif // _FSHELL_INTERNAL_LIVEBOX_LAYER_H_
+#endif // _FSHELL_INTERNAL_APPWIDGET_LAYER_H_
--- /dev/null
+//
+// 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_AppWidgetManagerImpl.cpp
+ * @brief This is the implementation for the _AppWidgetManagerImpl class.
+ */
+
+#include <unique_ptr.h>
+
+#include <shortcut.h>
+#include <livebox-service/livebox-service.h>
+
+#include <FBaseSysLog.h>
+#include <FBase.h>
+#include <FApp.h>
+#include <FGrpDimension.h>
+#include <FApp_AppImpl.h>
+#include <FBase_StringConverter.h>
+
+#include <FShellAppWidgetProviderInfo.h>
+#include <FShellAppWidgetProvider.h>
+#include <FShellAppWidgetPopupProvider.h>
+#include <FShellAppWidgetFrame.h>
+#include <FShellAppWidgetPopup.h>
+
+#include <FShellIAppWidgetAddRequestListener.h>
+#include <FShellIAppWidgetProviderFactory.h>
+#include <FShellIAppWidgetPopupProviderFactory.h>
+
+#include <FShell_IAppWidgetTouchEventListener.h>
+#include <FShell_TemplateUtil.h>
+
+#include "FShell_ShortcutManagerImpl.h"
+#include "FShell_AppWidgetManagerProxy.h"
+#include "FShell_AppWidgetManagerImpl.h"
+#include "FShell_AppWidgetProviderInfoImpl.h"
+
+namespace Tizen { namespace Shell
+{
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::App;
+using namespace Tizen::Graphics;
+
+_AppWidgetManagerImpl::_AppWidgetManagerImpl()
+ :__pAppWidgetRequestEventListener(null)
+{
+ SysLog(NID_APP, "");
+}
+
+_AppWidgetManagerImpl::~_AppWidgetManagerImpl()
+{
+ SysLog(NID_APP, "");
+ livebox_service_fini();
+}
+
+_AppWidgetManagerImpl*
+_AppWidgetManagerImpl::GetInstance()
+{
+ static _AppWidgetManagerImpl* __pAppWidgetManagerImpl = null;
+ if( __pAppWidgetManagerImpl == null)
+ {
+ __pAppWidgetManagerImpl = new (std::nothrow)_AppWidgetManagerImpl;
+ SysTryReturn(NID_APP, __pAppWidgetManagerImpl, null, E_OUT_OF_MEMORY, "Allocating new _AppWidgetManagerProxy failed.");
+
+ result r = __pAppWidgetManagerImpl->Construct();
+ SysTryReturn(NID_APP, !IsFailed(r), null, r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+ return __pAppWidgetManagerImpl;
+}
+
+result
+_AppWidgetManagerImpl::Construct()
+{
+ SysLog(NID_APP, "Enter.");
+
+ int ret = livebox_service_init();
+ SysTryReturnResult(NID_APP, ret == 0, E_SYSTEM, "[E_SYSTEM] Failed to invoke livebox_service_init, ret (%d)", ret);
+
+ SysLog(NID_APP, "Exit.");
+ return E_SUCCESS;
+}
+
+// c style callback for livebox_service_get_pkglist
+int GetAppWidgetProviderInfoCallback(const char *packageId, const char *pProviderId, int is_prime, void *data)
+{
+ SysLog(NID_APP, "%s, %s", packageId, pProviderId);
+
+ IList* pAppWidgetProviderInfos = static_cast<IList*>(data);
+ SysTryReturn(NID_APP, pAppWidgetProviderInfos, 0, E_SYSTEM, "[E_SYSTEM] system error.");
+
+ String providerId(pProviderId);
+ String appId;
+ String providerName;
+ _AppWidgetManagerImpl::ExtractAppIdAndProviderName(providerId, appId, providerName);
+
+ AppWidgetProviderInfo* pInfo = _AppWidgetProviderInfoImpl::GetAppWidgetProviderInfoN(appId, providerName, is_prime);
+ pAppWidgetProviderInfos->Add(*pInfo);
+
+ return 0;
+}
+
+Tizen::Base::Collection::IList*
+_AppWidgetManagerImpl::GetAppWidgetProviderInfoListN()
+{
+ std::unique_ptr<ArrayList> pAppWidgetProviders(new (std::nothrow) ArrayList());
+ SysTryReturn(NID_APP, pAppWidgetProviders.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
+
+ pAppWidgetProviders->Construct();
+ int ret = livebox_service_get_pkglist(GetAppWidgetProviderInfoCallback, pAppWidgetProviders.get());
+ if (ret < 0)
+ {
+ SysLog(NID_APP, "Failed to invoke livebox_service_get_pkglist, ret (%d)", ret);
+ }
+
+ if (pAppWidgetProviders->GetCount() <= 0)
+ {
+ return null;
+ }
+
+ return pAppWidgetProviders.release();
+}
+
+AppWidgetProviderInfo*
+_AppWidgetManagerImpl::GetAppWidgetProviderInfoN(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName)
+{
+ return _AppWidgetProviderInfoImpl::GetAppWidgetProviderInfoN(appId, providerName);
+}
+
+const int PROVIDER_NAME_MAX = 256;
+char __tempDefaultProviderResult[PROVIDER_NAME_MAX];
+
+// c style callback for livebox_service_get_pkglist
+int GetDefaultAppWidgetProviderInfoCallback(const char *packageId, const char *pProviderId, int is_prime, void *data)
+{
+ SysLog(NID_APP, "%s, %s", packageId, pProviderId);
+ char* pInputProviderId = static_cast<char*>(data);
+ SysTryReturn(NID_APP, pInputProviderId, 0, E_SYSTEM, "[E_SYSTEM] system error.");
+
+ if( strncmp(packageId, pInputProviderId, PROVIDER_NAME_MAX) == 0)
+ {
+ strncpy(__tempDefaultProviderResult, pProviderId, PROVIDER_NAME_MAX);
+ return -1;
+ }
+
+ return 0;
+}
+
+AppWidgetProviderInfo*
+_AppWidgetManagerImpl::GetDefaultAppWidgetProviderInfoN(const Tizen::App::PackageId& packageId)
+{
+ memset(__tempDefaultProviderResult, 0, sizeof(__tempDefaultProviderResult));
+
+ AppWidgetProviderInfo* pInfo = null;
+ std::unique_ptr<char[]> pPackageId(_StringConverter::CopyToCharArrayN(packageId));
+
+ int ret = livebox_service_get_pkglist(GetDefaultAppWidgetProviderInfoCallback, pPackageId.get());
+ if (ret < 0)
+ {
+ SysLog(NID_APP, "There is no AppWidget provider specifed, or It's failed to invoke livebox_service_get_pkglist, ret (%d)", ret);
+ return null;
+ }
+
+ String defaultProvider(__tempDefaultProviderResult);
+ if( !defaultProvider.IsEmpty())
+ {
+ String appId;
+ String providerName;
+ _AppWidgetManagerImpl::ExtractAppIdAndProviderName(__tempDefaultProviderResult, appId, providerName);
+
+ pInfo = _AppWidgetProviderInfoImpl::GetAppWidgetProviderInfoN(appId, providerName, true);
+ }
+ return pInfo;
+}
+
+
+bool __isDefault;
+// c style callback for livebox_service_get_pkglist
+int IsAppWidgetProviderDefaultInfoCallback(const char *packageId, const char *pProviderId, int is_prime, void *data)
+{
+ __isDefault = false;
+ SysLog(NID_APP, "%s, %s", packageId, pProviderId);
+ char* pInputProviderId = static_cast<char*>(data);
+ SysTryReturn(NID_APP, pInputProviderId, 0, E_SYSTEM, "[E_SYSTEM] system error.");
+
+ if( strncmp(packageId, pInputProviderId, 256) == 0)
+ {
+ __isDefault = is_prime;
+ return -1;
+ }
+
+ return 0;
+}
+
+bool
+_AppWidgetManagerImpl::IsAppWidgetProviderDefault(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName)
+{
+ __isDefault = false;
+
+ std::unique_ptr<char[]> pPackageId(_StringConverter::CopyToCharArrayN(_AppWidgetManagerImpl::MakeProviderName(appId, providerName)));
+
+ int ret = livebox_service_get_pkglist(IsAppWidgetProviderDefaultInfoCallback, pPackageId.get());
+ if (ret < 0)
+ {
+ SysLog(NID_APP, "Failed to invoke livebox_service_get_pkglist, ret (%d)", ret);
+ }
+
+ return __isDefault;
+}
+
+// c - style callback for shortcut_set_request_cb
+int AppWidgetRequestHandlerCallback(const char* providerId, const char* text, int type, const char* content_info, const char* icon, int pid, double period, void *data)
+{
+ SysLog(NID_APP, "Enter");
+ SysTryReturn(NID_APP, providerId, 0, E_SYSTEM, "[E_SYSTEM] providerId is null!");
+
+ _AppWidgetManagerImpl* pAppWidgetManager = static_cast<_AppWidgetManagerImpl*>(data);
+ SysTryReturn(NID_APP, pAppWidgetManager, 0, E_SYSTEM, "[E_SYSTEM] pAppWidgetManager is null!");
+
+ String appId;
+ String providerName;
+ _AppWidgetManagerImpl::ExtractAppIdAndProviderName(providerId, appId, providerName);
+
+ IAppWidgetAddRequestListener* pListener = _AppWidgetManagerImpl::GetInstance()->GetAddRequestListener();
+ SysTryReturn(NID_APP, pAppWidgetManager, 0, E_SYSTEM, "[E_SYSTEM] pListener is null!");
+ pListener->OnAppWidgetAddRequested(appId, providerName, text, content_info);
+ return 0;
+}
+
+result
+_AppWidgetManagerImpl::SetAppWidgetAddRequestListener(IAppWidgetAddRequestListener* pListener)
+{
+// int ret = shortcut_set_request_cb(AppWidgetRequestHandlerCallback, this );
+// SysTryReturnResult(NID_APP, ret == 0, E_SYSTEM, "failed to shortcut_set_request_cb (%d)", ret);
+ _ShortcutManagerImpl::GetInstance()->SetAppWidgetRequestHandlerCallback(AppWidgetRequestHandlerCallback);
+
+ __pAppWidgetRequestEventListener = pListener;
+ return E_SUCCESS;
+}
+
+IAppWidgetAddRequestListener*
+_AppWidgetManagerImpl::GetAddRequestListener()
+{
+ return __pAppWidgetRequestEventListener;
+}
+
+// helper
+result
+_AppWidgetManagerImpl::ExtractAppIdAndProviderName(const Tizen::Base::String& providerId, Tizen::App::AppId& appId, Tizen::Base::String& providerName)
+{
+ if( providerId.StartsWith("com.samsung", 0) == true)// for core livebox (plugin)
+ {
+ appId = providerId;
+ providerName = L"";
+ }
+ else
+ {
+ int index = 0;
+
+ providerId.IndexOf(".", 11, index);
+ providerId.SubString(0, index, appId);
+ providerId.SubString(index+1, providerName);
+ }
+
+ return E_SUCCESS;
+}
+
+String
+_AppWidgetManagerImpl::MakeProviderName(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName)
+{
+ String providerId;
+
+ if( appId.StartsWith("com.samsung", 0) == true)// for core livebox (plugin)
+ {
+ // or providerName.IsEmpty()
+ providerId = appId;
+ }
+ else
+ {
+ // for web
+ if (appId.IsEmpty())
+ {
+ providerId.Format(128, L"%ls", providerName.GetPointer() );
+ }
+ else
+ {
+ providerId.Format(128, L"%ls.%ls", appId.GetPointer(), providerName.GetPointer() );
+ }
+ }
+
+ return providerId;
+}
+
+}} // Tizen::Shell
//
/**
- * @file FShell_LiveboxManagerIpcMessage.cpp
+ * @file FShell_AppWidgetManagerIpcMessage.cpp
* @brief This file contains IPC message class generated by macros.
*/
#define IPC_MESSAGE_IMPL
-#include "FShell_LiveboxManagerIpcMessage.h"
+#include "FShell_AppWidgetManagerIpcMessage.h"
// Generate constructors.
#include "ipc/struct_constructor_macros.h"
-#include "FShell_LiveboxManagerIpcMessage.h"
+#include "FShell_AppWidgetManagerIpcMessage.h"
// Generate destructors.
#include "ipc/struct_destructor_macros.h"
-#include "FShell_LiveboxManagerIpcMessage.h"
+#include "FShell_AppWidgetManagerIpcMessage.h"
// Generate param traits write methods.
#include "ipc/param_traits_write_macros.h"
namespace IPC
{
-#include "FShell_LiveboxManagerIpcMessage.h"
+#include "FShell_AppWidgetManagerIpcMessage.h"
} // namespace IPC
// Generate param traits read methods.
#include "ipc/param_traits_read_macros.h"
namespace IPC
{
-#include "FShell_LiveboxManagerIpcMessage.h"
+#include "FShell_AppWidgetManagerIpcMessage.h"
} // namespace IPC
//
/**
- * @file FShell_LiveboxManagerProxy.cpp
- * @brief This is the implementation for the _LiveboxManagerProxy class.
+ * @file FShell_AppWidgetManagerProxy.cpp
+ * @brief This is the implementation for the _AppWidgetManagerProxy class.
*/
#include <FIo_IpcClient.h>
-#include <FShell_LiveboxManagerIpcMessage.h>
-#include "FShell_LiveboxProviderManagerImpl.h"
-#include "FShell_LiveboxManagerProxy.h"
+#include <FShell_AppWidgetManagerIpcMessage.h>
+#include "FShell_AppWidgetProviderManagerImpl.h"
+#include "FShell_AppWidgetManagerProxy.h"
namespace Tizen { namespace Shell {
namespace
{
-const char IPC_SERVER_NAME[] = "osp.shell.ipcserver.liveboxmanager";
+const char IPC_SERVER_NAME[] = "osp.shell.ipcserver.appwidgetmanager";
};
using namespace Tizen::Io;
-_LiveboxManagerProxy::_LiveboxManagerProxy()
+_AppWidgetManagerProxy::_AppWidgetManagerProxy()
: __pIpcClient(null)
{
SysLog(NID_APP, "");
}
-_LiveboxManagerProxy::~_LiveboxManagerProxy()
+_AppWidgetManagerProxy::~_AppWidgetManagerProxy()
{
delete __pIpcClient;
}
-_LiveboxManagerProxy*
-_LiveboxManagerProxy::GetInstance()
+_AppWidgetManagerProxy*
+_AppWidgetManagerProxy::GetInstance()
{
- static std::unique_ptr<_LiveboxManagerProxy> __pLiveboxProxy(null);
- if( __pLiveboxProxy.get() == null)
+ static std::unique_ptr<_AppWidgetManagerProxy> __pAppWidgetProxy(null);
+ if( __pAppWidgetProxy.get() == null)
{
- std::unique_ptr<_LiveboxManagerProxy> pLiveboxProxy(new (std::nothrow)_LiveboxManagerProxy);
- SysTryReturn(NID_APP, pLiveboxProxy.get(), null, E_OUT_OF_MEMORY, "Allocating new _LiveboxManagerProxy failed!");
+ std::unique_ptr<_AppWidgetManagerProxy> pAppWidgetProxy(new (std::nothrow)_AppWidgetManagerProxy);
+ SysTryReturn(NID_APP, pAppWidgetProxy.get(), null, E_OUT_OF_MEMORY, "Allocating new _AppWidgetManagerProxy failed!");
- result r = pLiveboxProxy->Construct();
+ result r = pAppWidgetProxy->Construct();
SysTryReturn(NID_APP, !IsFailed(r), null, r, "[%s] Propagating.", GetErrorMessage(r));
- __pLiveboxProxy = std::move(pLiveboxProxy);
+ __pAppWidgetProxy = std::move(pAppWidgetProxy);
}
- return __pLiveboxProxy.get();
+ return __pAppWidgetProxy.get();
}
result
-_LiveboxManagerProxy::Construct(void)
+_AppWidgetManagerProxy::Construct(void)
{
SysLog(NID_APP, "Enter.");
}
result
-_LiveboxManagerProxy::RequestUpdate(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Base::String& argument)
+_AppWidgetManagerProxy::RequestUpdate(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Base::String& argument)
{
SysTryReturnResult(NID_APP, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
SysLog(NID_APP, "Enter.");
// }
result ret = E_SUCCESS;
- std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) LiveboxManager_RequestUpdate(appId, providerName, argument, &ret));
+ std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) AppWidgetManager_RequestUpdate(appId, providerName, argument, &ret));
result r = __pIpcClient->SendRequest(*pMsg.get());
SysTryReturn(NID_APP, !IsFailed(r), r, r, "SendRequest is failed.");
}
result
-_LiveboxManagerProxy::RequestUpdateInstance(const Tizen::Base::String& instanceId, const Tizen::Base::String& argument)
+_AppWidgetManagerProxy::RequestUpdateInstance(const Tizen::Base::String& instanceId, const Tizen::Base::String& argument)
{
SysTryReturnResult(NID_APP, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
SysLog(NID_APP, "Enter.");
result ret = E_SUCCESS;
- std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) LiveboxManager_RequestUpdateInstance(instanceId, argument, &ret));
+ std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) AppWidgetManager_RequestUpdateInstance(instanceId, argument, &ret));
result r = __pIpcClient->SendRequest(*pMsg.get());
SysTryReturn(NID_APP, !IsFailed(r), r, r, "SendRequest is failed.");
}
result
-_LiveboxManagerProxy::RequestSharedMemoryId(const Tizen::Base::String& instanceId, int width, int height, int& shmId )
+_AppWidgetManagerProxy::RequestSharedMemoryId(const Tizen::Base::String& instanceId, int width, int height, int& shmId )
{
SysTryReturnResult(NID_APP, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
- std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) LiveboxManager_RequestSharedMemoryId(instanceId, width, height, &shmId));
+ std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) AppWidgetManager_RequestSharedMemoryId(instanceId, width, height, &shmId));
result r = __pIpcClient->SendRequest(*pMsg.get());
SysTryReturn(NID_APP, !IsFailed(r), r, r, "SendRequest is failed.");
- SysLog(NID_APP, "shmId(%d) is retrieved from livebox-service", shmId);
+ SysLog(NID_APP, "shmId(%d) is retrieved from appwidget-service", shmId);
return E_SUCCESS;
}
result
-_LiveboxManagerProxy::RequestSharedMemoryIdForPD(const Tizen::Base::String& instanceId, int width, int height, int& shmId )
+_AppWidgetManagerProxy::RequestSharedMemoryIdForPD(const Tizen::Base::String& instanceId, int width, int height, int& shmId )
{
SysTryReturnResult(NID_APP, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
- std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) LiveboxManager_RequestSharedMemoryIdForPD(instanceId, width, height, &shmId));
+ std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) AppWidgetManager_RequestSharedMemoryIdForPD(instanceId, width, height, &shmId));
result r = __pIpcClient->SendRequest(*pMsg.get());
SysTryReturn(NID_APP, !IsFailed(r), r, r, "SendRequest is failed.");
- SysLog(NID_APP, "shmId(%d) is retrieved from livebox-service", shmId);
+ SysLog(NID_APP, "shmId(%d) is retrieved from appwidget-service", shmId);
return E_SUCCESS;
}
result
-_LiveboxManagerProxy::RequestSyncSharedMemory(const Tizen::Base::String& instanceId, int width, int height)
+_AppWidgetManagerProxy::RequestSyncSharedMemory(const Tizen::Base::String& instanceId, int width, int height)
{
SysTryReturnResult(NID_APP, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
SysLog(NID_APP, "");
result ret = E_FAILURE;
- std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) LiveboxManager_RequestSyncSharedMemory(instanceId, width, height, &ret));
+ std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) AppWidgetManager_RequestSyncSharedMemory(instanceId, width, height, &ret));
result r = __pIpcClient->SendRequest(*pMsg.get());
SysTryReturn(NID_APP, !IsFailed(r), r, r, "SendRequest is failed.");
return E_SUCCESS;
}
result
-_LiveboxManagerProxy::RequestSyncSharedMemoryForPD(const Tizen::Base::String& instanceId)
+_AppWidgetManagerProxy::RequestSyncSharedMemoryForPD(const Tizen::Base::String& instanceId)
{
SysTryReturnResult(NID_APP, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
SysLog(NID_APP, "");
result ret = E_FAILURE;
- std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) LiveboxManager_RequestSyncSharedMemoryForPD(instanceId, &ret));
+ std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) AppWidgetManager_RequestSyncSharedMemoryForPD(instanceId, &ret));
result r = __pIpcClient->SendRequest(*pMsg.get());
SysTryReturn(NID_APP, !IsFailed(r), r, r, "SendRequest is failed.");
return E_SUCCESS;
}
result
-_LiveboxManagerProxy::RequestReleaseSharedMemory(const Tizen::Base::String& instanceId)
+_AppWidgetManagerProxy::RequestReleaseSharedMemory(const Tizen::Base::String& instanceId)
{
SysTryReturnResult(NID_APP, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
SysLog(NID_APP, "");
result ret = E_FAILURE;
- std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) LiveboxManager_RequestReleaseSharedMemory(instanceId, &ret));
+ std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) AppWidgetManager_RequestReleaseSharedMemory(instanceId, &ret));
result r = __pIpcClient->SendRequest(*pMsg.get());
SysTryReturn(NID_APP, !IsFailed(r), r, r, "SendRequest is failed.");
return E_SUCCESS;
}
result
-_LiveboxManagerProxy::RequestReleaseSharedMemoryForPD(const Tizen::Base::String& instanceId)
+_AppWidgetManagerProxy::RequestReleaseSharedMemoryForPD(const Tizen::Base::String& instanceId)
{
SysTryReturnResult(NID_APP, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
SysLog(NID_APP, "");
result ret = E_FAILURE;
- std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) LiveboxManager_RequestReleaseSharedMemoryForPD(instanceId, &ret));
+ std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) AppWidgetManager_RequestReleaseSharedMemoryForPD(instanceId, &ret));
result r = __pIpcClient->SendRequest(*pMsg.get());
SysTryReturn(NID_APP, !IsFailed(r), r, r, "SendRequest is failed.");
return E_SUCCESS;
result
-_LiveboxManagerProxy::OnTouchEventReceived(const Tizen::Base::String& instanceId, int eventType, double timeStamp, double x, double y )
+_AppWidgetManagerProxy::OnTouchEventReceived(const Tizen::Base::String& instanceId, int eventType, double timeStamp, double x, double y )
{
- return _LiveboxProviderManagerImpl::GetInstance()->ForwardTouchEvent(instanceId, eventType, timeStamp, x, y);
+ return _AppWidgetProviderManagerImpl::GetInstance()->ForwardTouchEvent(instanceId, eventType, timeStamp, x, y);
}
result
-_LiveboxManagerProxy::OnTouchEventReceivedForPD(const Tizen::Base::String& instanceId, int eventType, double timeStamp, double x, double y )
+_AppWidgetManagerProxy::OnTouchEventReceivedForPD(const Tizen::Base::String& instanceId, int eventType, double timeStamp, double x, double y )
{
- return _LiveboxProviderManagerImpl::GetInstance()->ForwardTouchEventForPD(instanceId, eventType, timeStamp, x, y);
+ return _AppWidgetProviderManagerImpl::GetInstance()->ForwardTouchEventForPD(instanceId, eventType, timeStamp, x, y);
}
void
-_LiveboxManagerProxy::OnIpcResponseReceived(_IpcClient& client, const IPC::Message& message)
+_AppWidgetManagerProxy::OnIpcResponseReceived(_IpcClient& client, const IPC::Message& message)
{
SysLog(NID_APP, "Enter.");
- IPC_BEGIN_MESSAGE_MAP(_LiveboxManagerProxy, message)
- IPC_MESSAGE_HANDLER_EX(LiveboxManager_SendTouchEvent, &client, OnTouchEventReceived )
- IPC_MESSAGE_HANDLER_EX(LiveboxManager_SendTouchEventForPD, &client, OnTouchEventReceivedForPD )
+ IPC_BEGIN_MESSAGE_MAP(_AppWidgetManagerProxy, message)
+ IPC_MESSAGE_HANDLER_EX(AppWidgetManager_SendTouchEvent, &client, OnTouchEventReceived )
+ IPC_MESSAGE_HANDLER_EX(AppWidgetManager_SendTouchEventForPD, &client, OnTouchEventReceivedForPD )
IPC_END_MESSAGE_MAP()
SysLog(NID_APP, "Exit.");
// limitations under the License.\r
//\r
/**\r
- * @file FShell_LiveboxPopup.cpp\r
- * @brief This is the implementation file for the _LiveboxPopup class.\r
+ * @file FShell_AppWidgetPopup.cpp\r
+ * @brief This is the implementation file for the _AppWidgetPopup class.\r
*/\r
\r
#include <new>\r
#include "FUi_ResourceManager.h"\r
#include "FUiAnim_DisplayManager.h"\r
#include "FUiAnim_RootVisualElement.h"\r
-#include "FShell_LiveboxLayer.h"\r
-#include "FShell_LiveboxPopup.h"\r
-#include "FShell_LiveboxPopupPresenter.h"\r
-#include "FShell_LiveboxProviderManagerImpl.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
namespace Tizen { namespace Shell\r
{\r
\r
-class _LiveboxPopupLayer\r
- : public _LiveboxLayer\r
+class _AppWidgetPopupLayer\r
+ : public _AppWidgetLayer\r
{\r
public:\r
- _LiveboxPopupLayer(const FloatDimension& size);\r
- virtual ~_LiveboxPopupLayer(void);\r
+ _AppWidgetPopupLayer(const FloatDimension& size);\r
+ virtual ~_AppWidgetPopupLayer(void);\r
\r
private:\r
- _LiveboxPopupLayer(const _LiveboxPopupLayer& rhs);\r
- _LiveboxPopupLayer& operator =(const _LiveboxPopupLayer& rhs);\r
+ _AppWidgetPopupLayer(const _AppWidgetPopupLayer& rhs);\r
+ _AppWidgetPopupLayer& operator =(const _AppWidgetPopupLayer& rhs);\r
\r
virtual result RegisterTouchEventListener(void);\r
virtual int AcquirePixmap(void);\r
virtual void ReleasePixmap(void);\r
};\r
\r
-_LiveboxPopupLayer::_LiveboxPopupLayer(const FloatDimension& size)\r
- : _LiveboxLayer(size)\r
+_AppWidgetPopupLayer::_AppWidgetPopupLayer(const FloatDimension& size)\r
+ : _AppWidgetLayer(size)\r
{\r
}\r
\r
-_LiveboxPopupLayer::~_LiveboxPopupLayer(void)\r
+_AppWidgetPopupLayer::~_AppWidgetPopupLayer(void)\r
{\r
if (!__isReleased)\r
{\r
}\r
\r
result\r
-_LiveboxPopupLayer::RegisterTouchEventListener(void)\r
+_AppWidgetPopupLayer::RegisterTouchEventListener(void)\r
{\r
- result r = _LiveboxProviderManagerImpl::GetInstance()->SetLiveboxPopupEventListener(*this);\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
-_LiveboxPopupLayer::AcquirePixmap(void)\r
+_AppWidgetPopupLayer::AcquirePixmap(void)\r
{\r
long long ticks = 0;\r
SystemTime::GetTicks(ticks);\r
\r
int pixmapId = -1;\r
\r
- result r = _LiveboxProviderManagerImpl::GetInstance()->RequestSharedMemoryIdForPD(GetProviderId(), __size.width, __size.height, pixmapId);\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
}\r
\r
result\r
-_LiveboxPopupLayer::Sync(const FloatDimension& size)\r
+_AppWidgetPopupLayer::Sync(const FloatDimension& size)\r
{\r
- result r = _LiveboxProviderManagerImpl::GetInstance()->RequestSyncSharedMemoryForPD(GetProviderId());\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
-_LiveboxPopupLayer::ReleasePixmap(void)\r
+_AppWidgetPopupLayer::ReleasePixmap(void)\r
{\r
- _LiveboxProviderManagerImpl::GetInstance()->RequestReleaseSharedMemoryForPD(GetProviderId());\r
+ _AppWidgetProviderManagerImpl::GetInstance()->RequestReleaseSharedMemoryForPD(GetProviderId());\r
}\r
\r
-_LiveboxPopup::_LiveboxPopup(void)\r
- : __pLiveboxPopupPresenter(new (std::nothrow) _LiveboxPopupPresenter(*this))\r
- , __pLiveboxPopupLayer(null)\r
- , __pLiveboxPopupRootVisualElement(null)\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, __pLiveboxPopupPresenter, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");\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
SysTryReturnVoidResult(NID_UI_CTRL, __pEventManager, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");\r
}\r
\r
-_LiveboxPopup::~_LiveboxPopup(void)\r
+_AppWidgetPopup::~_AppWidgetPopup(void)\r
{\r
if (__pEventManager)\r
{\r
__pEventManager->UnregisterTouchEventHandler(*this);\r
}\r
\r
- __pLiveboxPopupLayer = null;\r
- __pLiveboxPopupRootVisualElement = null;\r
+ __pAppWidgetPopupLayer = null;\r
+ __pAppWidgetPopupRootVisualElement = null;\r
}\r
\r
-_LiveboxPopup*\r
-_LiveboxPopup::CreateLiveboxPopupN(void)\r
+_AppWidgetPopup*\r
+_AppWidgetPopup::CreateAppWidgetPopupN(void)\r
{\r
- unique_ptr<_LiveboxPopup> pLiveboxPopup(new (std::nothrow) _LiveboxPopup());\r
- SysTryReturn(NID_UI_CTRL, pLiveboxPopup, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");\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
- pLiveboxPopup->AcquireHandle();\r
+ pAppWidgetPopup->AcquireHandle();\r
\r
SetLastResult(E_SUCCESS);\r
\r
- return pLiveboxPopup.release();\r
+ return pAppWidgetPopup.release();\r
}\r
\r
result\r
-_LiveboxPopup::Initialize(const FloatDimension& size)\r
+_AppWidgetPopup::Initialize(const FloatDimension& size)\r
{\r
long long ticks = 0;\r
SystemTime::GetTicks(ticks);\r
\r
result r = E_SUCCESS;\r
\r
- __liveboxSize = size;\r
+ __appwidgetSize = size;\r
\r
SetSystemWindow(true);\r
\r
r = SetBounds(bounds);\r
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
\r
- r = __pLiveboxPopupPresenter->Initialize();\r
+ r = __pAppWidgetPopupPresenter->Initialize();\r
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
\r
- __pLiveboxPopupLayer->SetLayerBounds(bounds);\r
- __pLiveboxPopupLayer->SetShowState(false);\r
+ __pAppWidgetPopupLayer->SetLayerBounds(bounds);\r
+ __pAppWidgetPopupLayer->SetShowState(false);\r
\r
- __pLiveboxPopupRootVisualElement->SetImplicitAnimationEnabled(false);\r
- __pLiveboxPopupRootVisualElement->SetName(L"_LiveboxPopup");\r
- __pLiveboxPopupRootVisualElement->SetBounds(bounds);\r
- __pLiveboxPopupRootVisualElement->SetShowState(false);\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
}\r
\r
result\r
-_LiveboxPopup::SetProviderId(const String& providerId)\r
+_AppWidgetPopup::SetProviderId(const String& providerId)\r
{\r
- __pLiveboxPopupPresenter->SetProviderId(providerId);\r
+ __pAppWidgetPopupPresenter->SetProviderId(providerId);\r
\r
- result r = __pLiveboxPopupLayer->SetProviderId(providerId);\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
-_LiveboxPopup::GetProviderId(void) const\r
+_AppWidgetPopup::GetProviderId(void) const\r
{\r
- return __pLiveboxPopupPresenter->GetProviderId();\r
+ return __pAppWidgetPopupPresenter->GetProviderId();\r
}\r
\r
void\r
-_LiveboxPopup::SetAnchorPosition(const FloatPoint& position)\r
+_AppWidgetPopup::SetAnchorPosition(const FloatPoint& position)\r
{\r
- return __pLiveboxPopupPresenter->SetAnchorPosition(position);\r
+ return __pAppWidgetPopupPresenter->SetAnchorPosition(position);\r
}\r
\r
FloatPoint\r
-_LiveboxPopup::GetAnchorPosition(void) const\r
+_AppWidgetPopup::GetAnchorPosition(void) const\r
{\r
- return __pLiveboxPopupPresenter->GetAnchorPosition();\r
+ return __pAppWidgetPopupPresenter->GetAnchorPosition();\r
}\r
\r
Canvas*\r
-_LiveboxPopup::GetClientAreaCanvasN(void) const\r
+_AppWidgetPopup::GetClientAreaCanvasN(void) const\r
{\r
Canvas* pCanvas = GetCanvasN(GetClientBoundsF());\r
result r = GetLastResult();\r
}\r
\r
FloatPoint\r
-_LiveboxPopup::TranslateToClientAreaPosition(const FloatPoint& controlPosition) const\r
+_AppWidgetPopup::TranslateToClientAreaPosition(const FloatPoint& controlPosition) const\r
{\r
FloatRectangle leftTop = GetClientBoundsF();\r
\r
}\r
\r
FloatPoint\r
-_LiveboxPopup::TranslateToControlPosition(const FloatPoint& clientPosition) const\r
+_AppWidgetPopup::TranslateToControlPosition(const FloatPoint& clientPosition) const\r
{\r
FloatRectangle leftTop = GetClientBoundsF();\r
\r
}\r
\r
result\r
-_LiveboxPopup::SetLayerShowState(bool showState)\r
+_AppWidgetPopup::SetLayerShowState(bool showState)\r
{\r
result r = E_SUCCESS;\r
\r
- if (__pLiveboxPopupRootVisualElement)\r
+ if (__pAppWidgetPopupRootVisualElement)\r
{\r
- _LiveboxPopupLayer* pLayer = dynamic_cast<_LiveboxPopupLayer*>(__pLiveboxPopupRootVisualElement->GetNativeLayer());\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
- __pLiveboxPopupRootVisualElement->SetShowState(showState);\r
+ __pAppWidgetPopupRootVisualElement->SetShowState(showState);\r
}\r
\r
return r;\r
}\r
\r
result\r
-_LiveboxPopup::SetLayerBounds(const FloatRectangle& bounds)\r
+_AppWidgetPopup::SetLayerBounds(const FloatRectangle& bounds)\r
{\r
result r = E_SUCCESS;\r
\r
- if (__pLiveboxPopupRootVisualElement)\r
+ if (__pAppWidgetPopupRootVisualElement)\r
{\r
- _LiveboxPopupLayer* pLayer = dynamic_cast<_LiveboxPopupLayer*>(__pLiveboxPopupRootVisualElement->GetNativeLayer());\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
- __pLiveboxPopupRootVisualElement->SetBounds(bounds);\r
+ __pAppWidgetPopupRootVisualElement->SetBounds(bounds);\r
}\r
\r
return r;\r
}\r
\r
FloatRectangle\r
-_LiveboxPopup::GetLiveboxPopupClientBounds(void) const\r
+_AppWidgetPopup::GetAppWidgetPopupClientBounds(void) const\r
{\r
int leftMargin = 0;\r
int rightMargin = 0;\r
}\r
\r
result\r
-_LiveboxPopup::CreateLayer(void)\r
+_AppWidgetPopup::CreateLayer(void)\r
{\r
- unique_ptr<_LiveboxPopupLayer> pLayer(new (std::nothrow) _LiveboxPopupLayer(__liveboxSize));\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
- __pLiveboxPopupLayer = pLayer.release();\r
- __pLiveboxPopupRootVisualElement = __pLiveboxPopupLayer->GetRootVisualElement();\r
+ __pAppWidgetPopupLayer = pLayer.release();\r
+ __pAppWidgetPopupRootVisualElement = __pAppWidgetPopupLayer->GetRootVisualElement();\r
\r
- SetLayer(*__pLiveboxPopupLayer);\r
- SetRootVisualElement(*__pLiveboxPopupRootVisualElement);\r
+ SetLayer(*__pAppWidgetPopupLayer);\r
+ SetRootVisualElement(*__pAppWidgetPopupRootVisualElement);\r
\r
return r;\r
}\r
\r
void\r
-_LiveboxPopup::OnActivated(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
-_LiveboxPopup::OnBoundsChanged(void)\r
+_AppWidgetPopup::OnBoundsChanged(void)\r
{\r
SetLayerBounds(GetBoundsF());\r
\r
- SetClientBounds(GetLiveboxPopupClientBounds());\r
+ SetClientBounds(GetAppWidgetPopupClientBounds());\r
}\r
\r
void\r
-_LiveboxPopup::OnDraw(void)\r
+_AppWidgetPopup::OnDraw(void)\r
{\r
- if (__pLiveboxPopupPresenter)\r
+ if (__pAppWidgetPopupPresenter)\r
{\r
- __pLiveboxPopupPresenter->Draw();\r
+ __pAppWidgetPopupPresenter->Draw();\r
}\r
}\r
\r
// limitations under the License.
//
/**
- * @file FShell_LiveboxPopup.h
- * @brief This is the header file for the _LiveboxPopup class.
+ * @file FShell_AppWidgetPopup.h
+ * @brief This is the header file for the _AppWidgetPopup class.
*
- * This header file contains the declarations of the %_LiveboxPopup class.
+ * This header file contains the declarations of the %_AppWidgetPopup class.
*/
-#ifndef _FSHELL_INTERNAL_LIVEBOX_POPUP_H_
-#define _FSHELL_INTERNAL_LIVEBOX_POPUP_H_
+#ifndef _FSHELL_INTERNAL_APPWIDGET_POPUP_H_
+#define _FSHELL_INTERNAL_APPWIDGET_POPUP_H_
#include <unique_ptr.h>
#include <FBaseString.h>
namespace Tizen { namespace Shell
{
-class _LiveboxPopupPresenter;
-class _LiveboxPopupLayer;
+class _AppWidgetPopupPresenter;
+class _AppWidgetPopupLayer;
/**
- * @class _LiveboxPopup
+ * @class _AppWidgetPopup
* @brief
* @since 2.1
*/
-class _LiveboxPopup
+class _AppWidgetPopup
: public Tizen::Ui::_Window
{
public:
- static _LiveboxPopup* CreateLiveboxPopupN(void);
- virtual ~_LiveboxPopup(void);
+ static _AppWidgetPopup* CreateAppWidgetPopupN(void);
+ virtual ~_AppWidgetPopup(void);
result Initialize(const Tizen::Graphics::FloatDimension& size);
result SetProviderId(const Tizen::Base::String& providerId);
Tizen::Base::String GetProviderId(void) const;
void SetAnchorPosition(const Tizen::Graphics::FloatPoint& position);
Tizen::Graphics::FloatPoint GetAnchorPosition(void) const;
- Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const;\r
+ Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const;
Tizen::Graphics::FloatPoint TranslateToClientAreaPosition(const Tizen::Graphics::FloatPoint& controlPosition) const;
Tizen::Graphics::FloatPoint TranslateToControlPosition(const Tizen::Graphics::FloatPoint& clientPosition) const;
protected:
- _LiveboxPopup(void);
+ _AppWidgetPopup(void);
private:
- _LiveboxPopup(const _LiveboxPopup& rhs);
- _LiveboxPopup& operator =(const _LiveboxPopup& rhs);
+ _AppWidgetPopup(const _AppWidgetPopup& rhs);
+ _AppWidgetPopup& operator =(const _AppWidgetPopup& rhs);
result SetLayerShowState(bool showState);
result SetLayerBounds(const Tizen::Graphics::FloatRectangle& bounds);
- Tizen::Graphics::FloatRectangle GetLiveboxPopupClientBounds(void) const;
+ Tizen::Graphics::FloatRectangle GetAppWidgetPopupClientBounds(void) const;
virtual result CreateLayer(void);
virtual void OnDraw(void);
private:
- std::unique_ptr<_LiveboxPopupPresenter> __pLiveboxPopupPresenter;
- _LiveboxPopupLayer* __pLiveboxPopupLayer;
- Tizen::Ui::Animations::_RootVisualElement* __pLiveboxPopupRootVisualElement;
+ std::unique_ptr<_AppWidgetPopupPresenter> __pAppWidgetPopupPresenter;
+ _AppWidgetPopupLayer* __pAppWidgetPopupLayer;
+ Tizen::Ui::Animations::_RootVisualElement* __pAppWidgetPopupRootVisualElement;
Tizen::Ui::_IUiEventManager* __pEventManager;
- Tizen::Graphics::FloatDimension __liveboxSize;
-}; // _LiveboxPopup
+ Tizen::Graphics::FloatDimension __appwidgetSize;
+}; // _AppWidgetPopup
}} // Tizen::Shell
-#endif // _FSHELL_INTERNAL_LIVEBOX_POPUP_H_
+#endif // _FSHELL_INTERNAL_APPWIDGET_POPUP_H_
--- /dev/null
+//
+// 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.
+//
+
+#include <new>
+#include <unique_ptr.h>
+#include <FBaseSysLog.h>
+#include "FShell_AppWidgetPopupImpl.h"
+
+using namespace std;
+using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
+
+namespace Tizen { namespace Shell
+{
+
+const _AppWidgetPopupImpl*
+_AppWidgetPopupImpl::GetInstance(const AppWidgetPopup& appwidgetPopup)
+{
+ return static_cast<const _AppWidgetPopupImpl*>(_ControlImpl::GetInstance(appwidgetPopup));
+}
+
+_AppWidgetPopupImpl*
+_AppWidgetPopupImpl::GetInstance(AppWidgetPopup& appwidgetPopup)
+{
+ return static_cast<_AppWidgetPopupImpl*>(_ControlImpl::GetInstance(appwidgetPopup));
+}
+
+_AppWidgetPopupImpl*
+_AppWidgetPopupImpl::CreateAppWidgetPopupImplN(AppWidgetPopup& appwidgetPopup, const Layout* pPortraitLayout, const Layout* pLandscapeLayout)
+{
+ unique_ptr<_AppWidgetPopup> pCore(_AppWidgetPopup::CreateAppWidgetPopupN());
+ result r = GetLastResult();
+ SysTryReturn(NID_UI_CTRL, pCore, null, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ unique_ptr<_AppWidgetPopupImpl> pImpl(new (std::nothrow) _AppWidgetPopupImpl(&appwidgetPopup, pCore.get(), pPortraitLayout, pLandscapeLayout));
+ SysTryReturn(NID_UI_CTRL, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+
+ pCore.release();
+
+ r = GetLastResult();
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return pImpl.release();
+}
+
+_AppWidgetPopupImpl::_AppWidgetPopupImpl(AppWidgetPopup* pPublic, _AppWidgetPopup* pCore, const Layout* pPortraitLayout, const Layout* pLandscapeLayout)
+ : _WindowImpl(pPublic, pCore, pPortraitLayout, pLandscapeLayout)
+{
+}
+
+_AppWidgetPopupImpl::~_AppWidgetPopupImpl(void)
+{
+}
+
+const char*
+_AppWidgetPopupImpl::GetPublicClassName(void) const
+{
+ return "Tizen::Shell::AppWidgetPopup";
+}
+
+const AppWidgetPopup&
+_AppWidgetPopupImpl::GetPublic(void) const
+{
+ return static_cast<const AppWidgetPopup&>(_ControlImpl::GetPublic());
+}
+
+AppWidgetPopup&
+_AppWidgetPopupImpl::GetPublic(void)
+{
+ return static_cast<AppWidgetPopup&>(_ControlImpl::GetPublic());
+}
+
+const _AppWidgetPopup&
+_AppWidgetPopupImpl::GetCore(void) const
+{
+ return static_cast<const _AppWidgetPopup&>(_ControlImpl::GetCore());
+}
+
+_AppWidgetPopup&
+_AppWidgetPopupImpl::GetCore(void)
+{
+ return static_cast<_AppWidgetPopup&>(_ControlImpl::GetCore());
+}
+
+result
+_AppWidgetPopupImpl::Initialize(const FloatDimension& size)
+{
+ result r = GetCore().Initialize(size);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return r;
+}
+
+result
+_AppWidgetPopupImpl::SetProviderId(const String& providerId)
+{
+ result r = GetCore().SetProviderId(providerId);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return r;
+}
+
+String
+_AppWidgetPopupImpl::GetProviderId(void) const
+{
+ return GetCore().GetProviderId();
+}
+
+void
+_AppWidgetPopupImpl::SetAnchorPosition(const FloatPoint& position)
+{
+ GetCore().SetAnchorPosition(position);
+}
+
+FloatPoint
+_AppWidgetPopupImpl::GetAnchorPosition(void) const
+{
+ return GetCore().GetAnchorPosition();
+}
+
+FloatRectangle
+_AppWidgetPopupImpl::GetClientAreaBounds(void) const
+{
+ return GetClientBoundsF();
+}
+
+Canvas*
+_AppWidgetPopupImpl::GetClientAreaCanvasN(void) const
+{
+ return GetCore().GetClientAreaCanvasN();
+}
+
+FloatPoint
+_AppWidgetPopupImpl::TranslateToClientAreaPosition(const FloatPoint& controlPosition) const
+{
+ return GetCore().TranslateToClientAreaPosition(controlPosition);
+}
+
+FloatPoint
+_AppWidgetPopupImpl::TranslateToControlPosition(const FloatPoint& clientPosition) const
+{
+ return GetCore().TranslateToControlPosition(clientPosition);
+}
+
+}} // Tizen::Shell
// See the License for the specific language governing permissions and
// limitations under the License.
//
-#ifndef _FSHELL_INTERNAL_LIVEBOX_POPUP_IMPL_H_
-#define _FSHELL_INTERNAL_LIVEBOX_POPUP_IMPL_H_
+#ifndef _FSHELL_INTERNAL_APPWIDGET_POPUP_IMPL_H_
+#define _FSHELL_INTERNAL_APPWIDGET_POPUP_IMPL_H_
-#include <FShellLiveboxPopup.h>
+#include <FShellAppWidgetPopup.h>
#include "FUi_WindowImpl.h"
-#include "FShell_LiveboxPopup.h"
+#include "FShell_AppWidgetPopup.h"
namespace Tizen { namespace Graphics
{
namespace Tizen { namespace Shell
{
-class _LiveboxPopupImpl
+class _AppWidgetPopupImpl
: public Tizen::Ui::_WindowImpl
{
public:
- static _LiveboxPopupImpl* CreateLiveboxPopupImplN(LiveboxPopup& liveboxPopup, const Tizen::Ui::Layout* pPortraitLayout, const Tizen::Ui::Layout* pLandscapeLayout);
- static const _LiveboxPopupImpl* GetInstance(const LiveboxPopup& liveboxPopup);
- static _LiveboxPopupImpl* GetInstance(LiveboxPopup& liveboxPopup);
+ static _AppWidgetPopupImpl* CreateAppWidgetPopupImplN(AppWidgetPopup& appwidgetPopup, const Tizen::Ui::Layout* pPortraitLayout, const Tizen::Ui::Layout* pLandscapeLayout);
+ static const _AppWidgetPopupImpl* GetInstance(const AppWidgetPopup& appwidgetPopup);
+ static _AppWidgetPopupImpl* GetInstance(AppWidgetPopup& appwidgetPopup);
- virtual ~_LiveboxPopupImpl(void);
+ virtual ~_AppWidgetPopupImpl(void);
virtual const char* GetPublicClassName(void) const;
- virtual const LiveboxPopup& GetPublic(void) const;
- virtual LiveboxPopup& GetPublic(void);
- virtual const _LiveboxPopup& GetCore(void) const;
- virtual _LiveboxPopup& GetCore(void);
+ virtual const AppWidgetPopup& GetPublic(void) const;
+ virtual AppWidgetPopup& GetPublic(void);
+ virtual const _AppWidgetPopup& GetCore(void) const;
+ virtual _AppWidgetPopup& GetCore(void);
result Initialize(const Tizen::Graphics::FloatDimension& size);
result SetProviderId(const Tizen::Base::String& providerId);
Tizen::Base::String GetProviderId(void) const;
void SetAnchorPosition(const Tizen::Graphics::FloatPoint& position);
- Tizen::Graphics::FloatPoint GetAnchorPosition(void) const;\r
- Tizen::Graphics::FloatRectangle GetClientAreaBounds(void) const;\r
- Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const;\r
+ Tizen::Graphics::FloatPoint GetAnchorPosition(void) const;
+ Tizen::Graphics::FloatRectangle GetClientAreaBounds(void) const;
+ Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const;
Tizen::Graphics::FloatPoint TranslateToClientAreaPosition(const Tizen::Graphics::FloatPoint& controlPosition) const;
Tizen::Graphics::FloatPoint TranslateToControlPosition(const Tizen::Graphics::FloatPoint& clientPosition) const;
protected:
- _LiveboxPopupImpl(LiveboxPopup* pPublic, _LiveboxPopup* pCore, const Tizen::Ui::Layout* pPortraitLayout, const Tizen::Ui::Layout* pLandscapeLayout);
+ _AppWidgetPopupImpl(AppWidgetPopup* pPublic, _AppWidgetPopup* pCore, const Tizen::Ui::Layout* pPortraitLayout, const Tizen::Ui::Layout* pLandscapeLayout);
private:
- _LiveboxPopupImpl(const _LiveboxPopupImpl& rhs);
- _LiveboxPopupImpl& operator =(const _LiveboxPopupImpl& rhs);
-}; // _LiveboxPopupImpl
+ _AppWidgetPopupImpl(const _AppWidgetPopupImpl& rhs);
+ _AppWidgetPopupImpl& operator =(const _AppWidgetPopupImpl& rhs);
+}; // _AppWidgetPopupImpl
}} // Tizen::Shell::Ui::Controls
-#endif // _FSHELL_INTERNAL_LIVEBOX_POPUP_IMPL_H_
+#endif // _FSHELL_INTERNAL_APPWIDGET_POPUP_IMPL_H_
// limitations under the License.
//
/**
- * @file FShell_LiveboxPopupModel.cpp
- * @brief This is the implementation file for the _LiveboxPopupModel class.
+ * @file FShell_AppWidgetPopupModel.cpp
+ * @brief This is the implementation file for the _AppWidgetPopupModel class.
*/
#include <FBaseSysLog.h>
-#include "FShell_LiveboxPopupModel.h"
+#include "FShell_AppWidgetPopupModel.h"
using namespace Tizen::Base;
using namespace Tizen::Graphics;
namespace Tizen { namespace Shell
{
-_LiveboxPopupModel::_LiveboxPopupModel(void)
+_AppWidgetPopupModel::_AppWidgetPopupModel(void)
{
}
-_LiveboxPopupModel::~_LiveboxPopupModel(void)
+_AppWidgetPopupModel::~_AppWidgetPopupModel(void)
{
}
void
-_LiveboxPopupModel::SetProviderId(const String& providerId)
+_AppWidgetPopupModel::SetProviderId(const String& providerId)
{
__providerId = providerId;
}
String
-_LiveboxPopupModel::GetProviderId(void) const
+_AppWidgetPopupModel::GetProviderId(void) const
{
return __providerId;
}
void
-_LiveboxPopupModel::SetAnchorPosition(const Tizen::Graphics::FloatPoint& position)
+_AppWidgetPopupModel::SetAnchorPosition(const Tizen::Graphics::FloatPoint& position)
{
__anchorPosition = position;
}
FloatPoint
-_LiveboxPopupModel::GetAnchorPosition(void) const
+_AppWidgetPopupModel::GetAnchorPosition(void) const
{
return __anchorPosition;
}
// limitations under the License.
//
/**
- * @file FShell_LiveboxPopupModel.h
- * @brief This is the header file for the _LiveboxPopupModel class.
+ * @file FShell_AppWidgetPopupModel.h
+ * @brief This is the header file for the _AppWidgetPopupModel class.
*
- * This header file contains the declarations of the %_LiveboxPopupModel class.
+ * This header file contains the declarations of the %_AppWidgetPopupModel class.
*/
-#ifndef _FSHELL_INTERNAL_LIVEBOX_POPUP_MODEL_H_
-#define _FSHELL_INTERNAL_LIVEBOX_POPUP_MODEL_H_
+#ifndef _FSHELL_INTERNAL_APPWIDGET_POPUP_MODEL_H_
+#define _FSHELL_INTERNAL_APPWIDGET_POPUP_MODEL_H_
#include <FBaseObject.h>
#include <FBaseString.h>
namespace Tizen { namespace Shell
{
-class _LiveboxPopupModel
+class _AppWidgetPopupModel
: public Tizen::Base::Object
{
public:
- _LiveboxPopupModel(void);
- virtual ~_LiveboxPopupModel(void);
+ _AppWidgetPopupModel(void);
+ virtual ~_AppWidgetPopupModel(void);
public:
void SetProviderId(const Tizen::Base::String& providerId);
Tizen::Graphics::FloatPoint GetAnchorPosition(void) const;
private:
- _LiveboxPopupModel(const _LiveboxPopupModel& rhs);
- _LiveboxPopupModel& operator =(const _LiveboxPopupModel& rhs);
+ _AppWidgetPopupModel(const _AppWidgetPopupModel& rhs);
+ _AppWidgetPopupModel& operator =(const _AppWidgetPopupModel& rhs);
private:
- Tizen::Base::String __providerId;\r
- Tizen::Graphics::FloatPoint __anchorPosition;\r
+ Tizen::Base::String __providerId;
+ Tizen::Graphics::FloatPoint __anchorPosition;
-}; // _LiveboxPopupModel
+}; // _AppWidgetPopupModel
}} // Tizen::Shell
-#endif // _FSHELL_INTERNAL_LIVEBOX_POPUP_MODEL_H_
+#endif // _FSHELL_INTERNAL_APPWIDGET_POPUP_MODEL_H_
// limitations under the License.
//
/**
- * @file FShell_LiveboxPopupPresenter.cpp
- * @brief This is the implementation file for the _LiveboxPopupPresenter class.
+ * @file FShell_AppWidgetPopupPresenter.cpp
+ * @brief This is the implementation file for the _AppWidgetPopupPresenter class.
*/
#include <new>
#include <FBaseSysLog.h>
-#include "FShell_LiveboxPopupPresenter.h"
-#include "FShell_LiveboxPopup.h"
-#include "FShell_LiveboxPopupModel.h"
+#include "FShell_AppWidgetPopupPresenter.h"
+#include "FShell_AppWidgetPopup.h"
+#include "FShell_AppWidgetPopupModel.h"
#include "FUi_ResourceManager.h"
using namespace std;
namespace Tizen { namespace Shell
{
-_LiveboxPopupPresenter::_LiveboxPopupPresenter(const _LiveboxPopup& liveBoxPopup)
- : __pLiveboxPopup(const_cast<_LiveboxPopup*>(&liveBoxPopup))
- , __pLiveboxPopupModel(new (std::nothrow) _LiveboxPopupModel)
+_AppWidgetPopupPresenter::_AppWidgetPopupPresenter(const _AppWidgetPopup& appwidgetPopup)
+ : __pAppWidgetPopup(const_cast<_AppWidgetPopup*>(&appwidgetPopup))
+ , __pAppWidgetPopupModel(new (std::nothrow) _AppWidgetPopupModel)
{
}
-_LiveboxPopupPresenter::~_LiveboxPopupPresenter(void)
+_AppWidgetPopupPresenter::~_AppWidgetPopupPresenter(void)
{
- __pLiveboxPopup = null;
+ __pAppWidgetPopup = null;
}
result
-_LiveboxPopupPresenter::Initialize(void)
+_AppWidgetPopupPresenter::Initialize(void)
{
Bitmap* pBitmap = null;
}
void
-_LiveboxPopupPresenter::SetProviderId(const String& providerId)
+_AppWidgetPopupPresenter::SetProviderId(const String& providerId)
{
- __pLiveboxPopupModel->SetProviderId(providerId);
+ __pAppWidgetPopupModel->SetProviderId(providerId);
}
String
-_LiveboxPopupPresenter::GetProviderId(void) const
+_AppWidgetPopupPresenter::GetProviderId(void) const
{
- return __pLiveboxPopupModel->GetProviderId();
+ return __pAppWidgetPopupModel->GetProviderId();
}
void
-_LiveboxPopupPresenter::SetAnchorPosition(const Tizen::Graphics::FloatPoint& position)
+_AppWidgetPopupPresenter::SetAnchorPosition(const Tizen::Graphics::FloatPoint& position)
{
- return __pLiveboxPopupModel->SetAnchorPosition(position);
+ return __pAppWidgetPopupModel->SetAnchorPosition(position);
}
FloatPoint
-_LiveboxPopupPresenter::GetAnchorPosition(void) const
+_AppWidgetPopupPresenter::GetAnchorPosition(void) const
{
- return __pLiveboxPopupModel->GetAnchorPosition();
+ return __pAppWidgetPopupModel->GetAnchorPosition();
}
void
-_LiveboxPopupPresenter::Draw(void)
+_AppWidgetPopupPresenter::Draw(void)
{
- unique_ptr<Canvas> pCanvas(__pLiveboxPopup->GetCanvasN());
+ unique_ptr<Canvas> pCanvas(__pAppWidgetPopup->GetCanvasN());
SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
DrawBackground(*pCanvas);
}
void
-_LiveboxPopupPresenter::DrawBackground(Canvas& canvas)
+_AppWidgetPopupPresenter::DrawBackground(Canvas& canvas)
{
- Rectangle bounds = __pLiveboxPopup->GetBounds();
+ Rectangle bounds = __pAppWidgetPopup->GetBounds();
bounds.x = 0;
bounds.y = 0;
}
void
-_LiveboxPopupPresenter::DrawAnchor(Canvas& canvas)
+_AppWidgetPopupPresenter::DrawAnchor(Canvas& canvas)
{
- Rectangle popupBounds = __pLiveboxPopup->GetBounds();
+ Rectangle popupBounds = __pAppWidgetPopup->GetBounds();
FloatPoint anchorF = GetAnchorPosition();
Bitmap* pArrowBitmap = null;
// limitations under the License.
//
/**
- * @file FShell_LiveboxPopupPresenter.h
- * @brief This is the header file for the _LiveboxPopupPresenter class.
+ * @file FShell_AppWidgetPopupPresenter.h
+ * @brief This is the header file for the _AppWidgetPopupPresenter class.
*
- * This header file contains the declarations of the %_LiveboxPopupPresenter class.
+ * This header file contains the declarations of the %_AppWidgetPopupPresenter class.
*/
-#ifndef _FSHELL_INTERNAL_LIVEBOX_POPUP_PRESENTER_H_
-#define _FSHELL_INTERNAL_LIVEBOX_POPUP_PRESENTER_H_
+#ifndef _FSHELL_INTERNAL_APPWIDGET_POPUP_PRESENTER_H_
+#define _FSHELL_INTERNAL_APPWIDGET_POPUP_PRESENTER_H_
#include <unique_ptr.h>
#include <FBaseString.h>
namespace Tizen { namespace Shell
{
-class _LiveboxPopup;
-class _LiveboxPopupModel;
+class _AppWidgetPopup;
+class _AppWidgetPopupModel;
-class _LiveboxPopupPresenter
+class _AppWidgetPopupPresenter
{
public:
- _LiveboxPopupPresenter(const _LiveboxPopup& liveBoxPopup);
- virtual ~_LiveboxPopupPresenter(void);
+ _AppWidgetPopupPresenter(const _AppWidgetPopup& appwidgetPopup);
+ virtual ~_AppWidgetPopupPresenter(void);
result Initialize(void);
void SetProviderId(const Tizen::Base::String& providerId);
void DrawAnchor(Tizen::Graphics::Canvas& canvas);
private:
- _LiveboxPopupPresenter(const _LiveboxPopupPresenter& rhs);
- _LiveboxPopupPresenter& operator =(const _LiveboxPopupPresenter& rhs);
+ _AppWidgetPopupPresenter(const _AppWidgetPopupPresenter& rhs);
+ _AppWidgetPopupPresenter& operator =(const _AppWidgetPopupPresenter& rhs);
private:
- _LiveboxPopup* __pLiveboxPopup;
- std::unique_ptr<_LiveboxPopupModel> __pLiveboxPopupModel;
+ _AppWidgetPopup* __pAppWidgetPopup;
+ std::unique_ptr<_AppWidgetPopupModel> __pAppWidgetPopupModel;
std::unique_ptr<Tizen::Graphics::Bitmap> __pBackgroundBitmap;
std::unique_ptr<Tizen::Graphics::Bitmap> __pArrowUpBitmap;
std::unique_ptr<Tizen::Graphics::Bitmap> __pArrowDownBitmap;
-}; // _LiveboxPopupPresenter
+}; // _AppWidgetPopupPresenter
}} // Tizen::Shell
-#endif // _FSHELL_INTERNAL_LIVEBOX_POPUP_PRESENTER_H_
+#endif // _FSHELL_INTERNAL_APPWIDGET_POPUP_PRESENTER_H_
--- /dev/null
+//
+// 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 .cpp
+ * @brief This is the implementation for the AppWidget class.
+ */
+
+#include <FBaseSysLog.h>
+#include <FShellAppWidgetPopup.h>
+
+#include "FShell_AppWidgetProviderManagerImpl.h"
+#include "FShell_AppWidgetPopupProviderImpl.h"
+#include "FShell_AppWidgetPopupImpl.h"
+
+namespace Tizen { namespace Shell
+{
+
+using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+
+_AppWidgetPopupProviderImpl::_AppWidgetPopupProviderImpl(const String& instanceId, double x, double y)
+ :__instanceId(instanceId)
+ ,__pAppWidgetPopup(null)
+ ,__x(x)
+ ,__y(y)
+ ,__width(0)
+ ,__height(0)
+{
+
+}
+
+_AppWidgetPopupProviderImpl::~_AppWidgetPopupProviderImpl()
+{
+ delete __pAppWidgetPopup;
+}
+
+const String&
+_AppWidgetPopupProviderImpl::GetInstanceId() const
+{
+ return __instanceId;
+}
+
+result
+_AppWidgetPopupProviderImpl::SetAppWidgetPopup(AppWidgetPopup* pAppWidgetPopup)
+{
+ if( __pAppWidgetPopup == pAppWidgetPopup)
+ {
+ return E_SUCCESS;
+ }
+
+ __pAppWidgetPopup = pAppWidgetPopup;
+
+ if( pAppWidgetPopup == null)
+ {
+ return E_SUCCESS;
+ }
+
+ _AppWidgetPopupImpl* pAppWidgetPopupImpl = _AppWidgetPopupImpl::GetInstance(*pAppWidgetPopup);
+ SysTryReturnResult(NID_APP, pAppWidgetPopupImpl, E_INVALID_OPERATION, "Not-yet constructed! AppWidgetPopup::Construct() should be called before use.");
+
+ pAppWidgetPopupImpl->SetAnchorPosition(FloatPoint(__x, __y));
+ pAppWidgetPopupImpl->SetProviderId(GetInstanceId());
+
+ return E_SUCCESS;
+}
+
+AppWidgetPopup*
+_AppWidgetPopupProviderImpl::GetAppWidgetPopup() const
+{
+ return __pAppWidgetPopup;
+}
+
+result
+_AppWidgetPopupProviderImpl::RequestUpdateToAppWidget()
+{
+ return _AppWidgetProviderManagerImpl::GetInstance()->RequestUpdateInstance(__instanceId);
+}
+
+}} // Tizen::Shell
// limitations under the License.
//
/**
- * @file FShell_LiveboxPopupView.cpp
- * @brief This is the implementation file for the _LiveboxPopupView class.
+ * @file FShell_AppWidgetPopupView.cpp
+ * @brief This is the implementation file for the _AppWidgetPopupView class.
*/
#include <new>
#include <FBase_StringConverter.h>
#include <FGrp_BitmapImpl.h>
#include <FMedia_ImageDecoder.h>
-#include "FShell_LiveboxPopupView.h"
-#include "FShell_LiveboxPopupViewPresenter.h"
-#include "FShell_LiveboxPopupViewEvent.h"
-#include "FShell_LiveboxView.h"
-#include "FShell_ILiveboxPopupViewEventListener.h"
+#include "FShell_AppWidgetPopupView.h"
+#include "FShell_AppWidgetPopupViewPresenter.h"
+#include "FShell_AppWidgetPopupViewEvent.h"
+#include "FShell_AppWidgetView.h"
+#include "FShell_IAppWidgetPopupViewEventListener.h"
#include "FUi_ControlManager.h"
#include "FUiAnim_EflNode.h"
#include "FUiAnim_VisualElement.h"
const wchar_t* OPEN_ANIMATION = L"Open";
const wchar_t* CLOSE_ANIMATION = L"Close";
-_LiveboxPopupView::_LiveboxPopupView(_LiveboxView& liveBoxView)
- : __pLiveboxPopupViewPresenter(new (std::nothrow) _LiveboxPopupViewPresenter(*this))
- , __pLiveboxView(&liveBoxView)
- , __pLiveboxPopupViewEvent(_LiveboxPopupViewEvent::CreateInstanceN(*this))
+_AppWidgetPopupView::_AppWidgetPopupView(_AppWidgetView& appwidgetView)
+ : __pAppWidgetPopupViewPresenter(new (std::nothrow) _AppWidgetPopupViewPresenter(*this))
+ , __pAppWidgetView(&appwidgetView)
+ , __pAppWidgetPopupViewEvent(_AppWidgetPopupViewEvent::CreateInstanceN(*this))
, __firstUpdated(false)
, __pixmap(-1)
{
}
-_LiveboxPopupView::~_LiveboxPopupView(void)
+_AppWidgetPopupView::~_AppWidgetPopupView(void)
{
- if (livebox_has_pd(__pLiveboxView->__pLivebox))
+ if (livebox_has_pd(__pAppWidgetView->__pAppWidget))
{
- livebox_destroy_pd(__pLiveboxView->__pLivebox, OnLiveboxPopupDestroyed, this);
+ livebox_destroy_pd(__pAppWidgetView->__pAppWidget, OnAppWidgetPopupDestroyed, this);
}
- __pLiveboxView = null;
+ __pAppWidgetView = null;
}
-_LiveboxPopupView*
-_LiveboxPopupView::CreateLiveboxPopupN(_LiveboxView& liveBoxView)
+_AppWidgetPopupView*
+_AppWidgetPopupView::CreateAppWidgetPopupN(_AppWidgetView& appwidgetView)
{
- SysTryReturn(NID_UI_CTRL, livebox_has_pd(liveBoxView.__pLivebox), null, E_SYSTEM, "[E_SYSTEM] A system error occured.");
+ SysTryReturn(NID_UI_CTRL, livebox_has_pd(appwidgetView.__pAppWidget), null, E_SYSTEM, "[E_SYSTEM] A system error occured.");
- unique_ptr<_LiveboxPopupView> pLiveboxPopup(new (std::nothrow) _LiveboxPopupView(liveBoxView));
- SysTryReturn(NID_UI_CTRL, pLiveboxPopup, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ unique_ptr<_AppWidgetPopupView> pAppWidgetPopup(new (std::nothrow) _AppWidgetPopupView(appwidgetView));
+ 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));
- r = pLiveboxPopup->CreateRootVisualElement();
+ r = pAppWidgetPopup->CreateRootVisualElement();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
- pLiveboxPopup->AcquireHandle();
+ pAppWidgetPopup->AcquireHandle();
SetLastResult(E_SUCCESS);
- return pLiveboxPopup.release();
+ return pAppWidgetPopup.release();
}
result
-_LiveboxPopupView::Initialize(const FloatRectangle& bounds)
+_AppWidgetPopupView::Initialize(const FloatRectangle& bounds)
{
FloatDimension screenSize = _ControlManager::GetInstance()->GetScreenSizeF();
- FloatRectangle viewAbsoluteBounds = __pLiveboxView->GetAbsoluteBoundsF();
+ FloatRectangle viewAbsoluteBounds = __pAppWidgetView->GetAbsoluteBoundsF();
double x = (static_cast<double>(viewAbsoluteBounds.x) + static_cast<double>((viewAbsoluteBounds.width) / 2)) / static_cast<double>(screenSize.width);
double y = 0.0f;
int lower = 0;
int upper = 0;
- __pLiveboxView->GetRemainingSpace(lower, upper);
+ __pAppWidgetView->GetRemainingSpace(lower, upper);
if (lower > upper)
{
SysLog(NID_UI_CTRL, "[%f %f %f %f]", viewAbsoluteBounds.x, viewAbsoluteBounds.y, viewAbsoluteBounds.width, viewAbsoluteBounds.height);
SysLog(NID_UI_CTRL, "[%f %f]", x, y);
- int ret = livebox_create_pd_with_position(__pLiveboxView->__pLivebox, x, y, OnLiveboxPopupCreated, this);
+ int ret = livebox_create_pd_with_position(__pAppWidgetView->__pAppWidget, x, y, OnAppWidgetPopupCreated, this);
SysTryReturn(NID_UI_CTRL, ret == 0, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
result r = SetBounds(bounds);
}
result
-_LiveboxPopupView::AddLiveboxPopupEventListener(const _ILiveboxPopupViewEventListener& listener)
+_AppWidgetPopupView::AddAppWidgetPopupEventListener(const _IAppWidgetPopupViewEventListener& listener)
{
- result r = __pLiveboxPopupViewEvent->AddListener(listener);
+ result r = __pAppWidgetPopupViewEvent->AddListener(listener);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return r;
}
result
-_LiveboxPopupView::RemoveLiveboxPopupEventListener(const _ILiveboxPopupViewEventListener& listener)
+_AppWidgetPopupView::RemoveAppWidgetPopupEventListener(const _IAppWidgetPopupViewEventListener& listener)
{
- result r = __pLiveboxPopupViewEvent->RemoveListener(listener);
+ result r = __pAppWidgetPopupViewEvent->RemoveListener(listener);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return r;
}
Bitmap*
-_LiveboxPopupView::GetBitmap(void) const
+_AppWidgetPopupView::GetBitmap(void) const
{
return __pBitmap.get();
}
void
-_LiveboxPopupView::SetPopupBounds(const FloatDimension& size)
+_AppWidgetPopupView::SetPopupBounds(const FloatDimension& size)
{
- FloatRectangle absoluteViewBounds = __pLiveboxView->GetAbsoluteBoundsF();
+ FloatRectangle absoluteViewBounds = __pAppWidgetView->GetAbsoluteBoundsF();
FloatRectangle popupBounds(0, 0, size.width, size.height);
int lower = 0;
int upper = 0;
- FloatDimension anchorSize = __pLiveboxView->GetAnchorSize();
- __pLiveboxView->GetRemainingSpace(lower, upper);
+ FloatDimension anchorSize = __pAppWidgetView->GetAnchorSize();
+ __pAppWidgetView->GetRemainingSpace(lower, upper);
if (lower > upper)
{
}
void
-_LiveboxPopupView::FireLiveboxPopupEvent(bool open)
+_AppWidgetPopupView::FireAppWidgetPopupEvent(bool open)
{
- if (__pLiveboxPopupViewEvent)
+ if (__pAppWidgetPopupViewEvent)
{
- IEventArg* pEventArg = _LiveboxPopupViewEvent::CreateLiveboxPopupViewEventArgN(open);
+ IEventArg* pEventArg = _AppWidgetPopupViewEvent::CreateAppWidgetPopupViewEventArgN(open);
result r = GetLastResult();
SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
- __pLiveboxPopupViewEvent->Fire(*pEventArg);
+ __pAppWidgetPopupViewEvent->Fire(*pEventArg);
}
}
void
-_LiveboxPopupView::GetTouchPostion(const Tizen::Graphics::FloatPoint& point, double& x, double& y) const
+_AppWidgetPopupView::GetTouchPostion(const Tizen::Graphics::FloatPoint& point, double& x, double& y) const
{
FloatRectangle bounds = GetBoundsF();
}
void
-_LiveboxPopupView::PlayAnimation(bool open)
+_AppWidgetPopupView::PlayAnimation(bool open)
{
const int ANIMATION1_DURATION = 100;
// const int ANIMATION2_DURATION = 300;
}
result
-_LiveboxPopupView::OnAttached(void)
+_AppWidgetPopupView::OnAttached(void)
{
if (__firstUpdated)
{
}
void
-_LiveboxPopupView::OnActivated(void)
+_AppWidgetPopupView::OnActivated(void)
{
SetTouchCapture();
}
void
-_LiveboxPopupView::OnDeactivated(void)
+_AppWidgetPopupView::OnDeactivated(void)
{
ReleaseTouchCapture();
}
bool
-_LiveboxPopupView::OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo)
+_AppWidgetPopupView::OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo)
{
double x = 0.0;
double y = 0.0;
Point position = _CoordinateSystemUtils::ConvertToInteger(touchInfo.GetCurrentPosition());
GetTouchPostion(FloatPoint(static_cast<float>(position.x), static_cast<float>(position.y)), x, y);
- livebox_content_event(__pLiveboxView->__pLivebox, PD_MOUSE_DOWN, x, y);
+ livebox_content_event(__pAppWidgetView->__pAppWidget, PD_MOUSE_DOWN, x, y);
return false;
}
bool
-_LiveboxPopupView::OnTouchReleased(const _Control& source, const _TouchInfo& touchInfo)
+_AppWidgetPopupView::OnTouchReleased(const _Control& source, const _TouchInfo& touchInfo)
{
FloatRectangle clientBounds(GetClientBoundsF());
GetTouchPostion(floatPosition, x, y);
- livebox_content_event(__pLiveboxView->__pLivebox, PD_MOUSE_UP, x, y);
+ livebox_content_event(__pAppWidgetView->__pAppWidget, PD_MOUSE_UP, x, y);
return false;
}
bool
-_LiveboxPopupView::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo)
+_AppWidgetPopupView::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo)
{
double x = 0.0;
double y = 0.0;
Point position = _CoordinateSystemUtils::ConvertToInteger(touchInfo.GetCurrentPosition());
GetTouchPostion(FloatPoint(static_cast<float>(position.x), static_cast<float>(position.y)), x, y);
- livebox_content_event(__pLiveboxView->__pLivebox, PD_MOUSE_MOVE, x, y);
+ livebox_content_event(__pAppWidgetView->__pAppWidget, PD_MOUSE_MOVE, x, y);
return false;
}
void
-_LiveboxPopupView::OnBoundsChanged(void)
+_AppWidgetPopupView::OnBoundsChanged(void)
{
}
void
-_LiveboxPopupView::OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target)
+_AppWidgetPopupView::OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target)
{
}
void
-_LiveboxPopupView::OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally)
+_AppWidgetPopupView::OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally)
{
if (keyName == CLOSE_ANIMATION)
{
- SysLog(NID_UI_CTRL, "Close LiveboxPopup");
+ SysLog(NID_UI_CTRL, "Close AppWidgetPopup");
Close();
- FireLiveboxPopupEvent(false);
+ FireAppWidgetPopupEvent(false);
}
}
void
-_LiveboxPopupView::OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount)
+_AppWidgetPopupView::OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount)
{
}
void
-_LiveboxPopupView::OnDraw(void)
+_AppWidgetPopupView::OnDraw(void)
{
- __pLiveboxPopupViewPresenter->Draw();
+ __pAppWidgetPopupViewPresenter->Draw();
}
void
-_LiveboxPopupView::OnLiveboxUpdated(const Tizen::Graphics::Bitmap& bitmap, const Tizen::Graphics::FloatDimension& size)
+_AppWidgetPopupView::OnAppWidgetUpdated(const Tizen::Graphics::Bitmap& bitmap, const Tizen::Graphics::FloatDimension& size)
{
long long ticks = 0;
SystemTime::GetTicks(ticks);
}
void
-_LiveboxPopupView::OnLiveboxUpdated(int pixmap)
+_AppWidgetPopupView::OnAppWidgetUpdated(int pixmap)
{
int x = 0;
int y = 0;
SetBackgroundColor(Color(0, 0, 0, 0));
_VisualElement* pVisualElement = GetVisualElement();
-// _VisualElement* pVisualElement = __pLiveboxView->GetVisualElement();
+// _VisualElement* pVisualElement = __pAppWidgetView->GetVisualElement();
SysTryReturnVoidResult(NID_UI_CTRL, pVisualElement, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
_EflNode* pEflNode = dynamic_cast<_EflNode*>(pVisualElement->GetNativeNode());
}
void
-_LiveboxPopupView::OnLiveboxPopupCreated(struct livebox *pLivebox, int ret, void* pData)
+_AppWidgetPopupView::OnAppWidgetPopupCreated(struct livebox *pAppWidget, int ret, void* pData)
{
- SysTryReturnVoidResult(NID_UI_CTRL, pLivebox, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidget, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
SysTryReturnVoidResult(NID_UI_CTRL, ret == 0, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- _LiveboxPopupView* pLiveboxViewManager = static_cast<_LiveboxPopupView*>(pData);
- SysTryReturnVoidResult(NID_UI_CTRL, pLiveboxViewManager, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ _AppWidgetPopupView* pAppWidgetViewManager = static_cast<_AppWidgetPopupView*>(pData);
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidgetViewManager, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
}
void
-_LiveboxPopupView::OnLiveboxPopupDestroyed(struct livebox *pLivebox, int ret, void* pData)
+_AppWidgetPopupView::OnAppWidgetPopupDestroyed(struct livebox *pAppWidget, int ret, void* pData)
{
- SysTryReturnVoidResult(NID_UI_CTRL, pLivebox, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidget, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
SysTryReturnVoidResult(NID_UI_CTRL, ret == 0, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- _LiveboxPopupView* pLiveboxViewManager = static_cast<_LiveboxPopupView*>(pData);
- SysTryReturnVoidResult(NID_UI_CTRL, pLiveboxViewManager, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ _AppWidgetPopupView* pAppWidgetViewManager = static_cast<_AppWidgetPopupView*>(pData);
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidgetViewManager, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
}
Eina_Bool
-_LiveboxPopupView::OnPixmapDamaged(void* pData, int type, void* pEvent)
+_AppWidgetPopupView::OnPixmapDamaged(void* pData, int type, void* pEvent)
{
- _LiveboxPopupView* pPopupView = static_cast<_LiveboxPopupView*>(pData);
+ _AppWidgetPopupView* pPopupView = static_cast<_AppWidgetPopupView*>(pData);
SysTryReturn(NID_UI_CTRL, pPopupView != null, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[[E_INVALID_ARG] The argument is invalid.");
Ecore_X_Event_Damage* pDamageEvent = static_cast<Ecore_X_Event_Damage*>(pEvent);
// limitations under the License.
//
/**
- * @file FShell_LiveboxPopupView.h
- * @brief This is the header file for the _LiveboxPopupView class.
+ * @file FShell_AppWidgetPopupView.h
+ * @brief This is the header file for the _AppWidgetPopupView class.
*
- * This header file contains the declarations of the %_LiveboxPopupView class.
+ * This header file contains the declarations of the %_AppWidgetPopupView class.
*/
-#ifndef _FSHELL_INTERNAL_LIVEBOX_POPUP_VIEW_H_
-#define _FSHELL_INTERNAL_LIVEBOX_POPUP_VIEW_H_
+#ifndef _FSHELL_INTERNAL_APPWIDGET_POPUP_VIEW_H_
+#define _FSHELL_INTERNAL_APPWIDGET_POPUP_VIEW_H_
#include <unique_ptr.h>
#include <Evas.h>
namespace Tizen { namespace Shell
{
-class _LiveboxPopupViewPresenter;
-class _LiveboxPopupViewEvent;
-class _LiveboxView;
-class _ILiveboxPopupViewEventListener;
+class _AppWidgetPopupViewPresenter;
+class _AppWidgetPopupViewEvent;
+class _AppWidgetView;
+class _IAppWidgetPopupViewEventListener;
/**
- * @class _LiveboxPopupView
+ * @class _AppWidgetPopupView
* @brief
* @since 2.1
*/
-class _LiveboxPopupView
+class _AppWidgetPopupView
: public Tizen::Ui::_Window
, public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener
{
public:
- static _LiveboxPopupView* CreateLiveboxPopupN(_LiveboxView& liveBoxView);
- virtual ~_LiveboxPopupView(void);
+ static _AppWidgetPopupView* CreateAppWidgetPopupN(_AppWidgetView& appwidgetView);
+ virtual ~_AppWidgetPopupView(void);
result Initialize(const Tizen::Graphics::FloatRectangle& bounds);
- result AddLiveboxPopupEventListener(const _ILiveboxPopupViewEventListener& listener);
- result RemoveLiveboxPopupEventListener(const _ILiveboxPopupViewEventListener& listener);
+ result AddAppWidgetPopupEventListener(const _IAppWidgetPopupViewEventListener& listener);
+ result RemoveAppWidgetPopupEventListener(const _IAppWidgetPopupViewEventListener& listener);
Tizen::Graphics::Bitmap* GetBitmap(void) const;
protected:
- _LiveboxPopupView(_LiveboxView& liveBoxView);
+ _AppWidgetPopupView(_AppWidgetView& appwidgetView);
private:
- _LiveboxPopupView(const _LiveboxPopupView& rhs);
- _LiveboxPopupView& operator =(const _LiveboxPopupView& rhs);
+ _AppWidgetPopupView(const _AppWidgetPopupView& rhs);
+ _AppWidgetPopupView& operator =(const _AppWidgetPopupView& rhs);
void SetPopupBounds(const Tizen::Graphics::FloatDimension& size);
- void FireLiveboxPopupEvent(bool open);
+ void FireAppWidgetPopupEvent(bool open);
void GetTouchPostion(const Tizen::Graphics::FloatPoint& point, double& x, double& y) const;
void PlayAnimation(bool open);
virtual void OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount);
virtual void OnDraw(void);
- void OnLiveboxUpdated(const Tizen::Graphics::Bitmap& bitmap, const Tizen::Graphics::FloatDimension& size);
- void OnLiveboxUpdated(int pixmap);
+ void OnAppWidgetUpdated(const Tizen::Graphics::Bitmap& bitmap, const Tizen::Graphics::FloatDimension& size);
+ void OnAppWidgetUpdated(int pixmap);
- static void OnLiveboxPopupCreated(struct livebox *pLivebox, int ret, void* pData);
- static void OnLiveboxPopupDestroyed(struct livebox *pLivebox, int ret, void* pData);
+ static void OnAppWidgetPopupCreated(struct livebox *pAppWidget, int ret, void* pData);
+ static void OnAppWidgetPopupDestroyed(struct livebox *pAppWidget, int ret, void* pData);
static Eina_Bool OnPixmapDamaged(void* pData, int type, void* pEvent);
private:
- friend class _LiveboxViewManager;
- std::unique_ptr<_LiveboxPopupViewPresenter> __pLiveboxPopupViewPresenter;
+ friend class _AppWidgetViewManager;
+ std::unique_ptr<_AppWidgetPopupViewPresenter> __pAppWidgetPopupViewPresenter;
std::unique_ptr<Tizen::Graphics::Bitmap> __pBitmap;
- _LiveboxView* __pLiveboxView;
- std::unique_ptr<_LiveboxPopupViewEvent> __pLiveboxPopupViewEvent;
+ _AppWidgetView* __pAppWidgetView;
+ std::unique_ptr<_AppWidgetPopupViewEvent> __pAppWidgetPopupViewEvent;
bool __firstUpdated;
int __pixmap;
}
};
std::unique_ptr<Ecore_Event_Handler, _EcoreEventHandlerDeleter> __pPixmapEventHandler;
-}; // _LiveboxPopupView
+}; // _AppWidgetPopupView
}} // Tizen::Shell
-#endif // _FSHELL_INTERNAL_LIVEBOX_POPUP_VIEW_H_
+#endif // _FSHELL_INTERNAL_APPWIDGET_POPUP_VIEW_H_
--- /dev/null
+//
+// 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_AppWidgetPopupViewEvent.cpp
+* @brief This is the implementation for the _AppWidgetPopupViewEvent class.
+*/
+
+#include <new>
+#include <FBaseErrors.h>
+#include <FBaseSysLog.h>
+#include "FShell_IAppWidgetPopupViewEventListener.h"
+#include "FShell_AppWidgetPopupViewEvent.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Runtime;
+using namespace Tizen::Ui;
+
+namespace Tizen { namespace Shell
+{
+
+class _AppWidgetPopupEventArg
+ : public Object
+ , public IEventArg
+{
+public:
+ _AppWidgetPopupEventArg(bool open);
+ virtual ~_AppWidgetPopupEventArg(void);
+
+ bool IsOpened(void) const;
+
+private:
+ bool __opened;
+
+}; // _AppWidgetPopupEventArg
+
+_AppWidgetPopupEventArg::_AppWidgetPopupEventArg(bool open)
+ : __opened(open)
+{
+}
+
+_AppWidgetPopupEventArg::~_AppWidgetPopupEventArg(void)
+{
+}
+
+bool
+_AppWidgetPopupEventArg::IsOpened(void) const
+{
+ return __opened;
+}
+
+_AppWidgetPopupViewEvent::_AppWidgetPopupViewEvent(const _Control& source)
+ : __pSource(null)
+{
+ result r = _Event::Initialize();
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pSource = &source;
+ SetLastResult(E_SUCCESS);
+}
+
+_AppWidgetPopupViewEvent::~_AppWidgetPopupViewEvent(void)
+{
+}
+
+_AppWidgetPopupViewEvent*
+_AppWidgetPopupViewEvent::CreateInstanceN(const _Control& source)
+{
+ _AppWidgetPopupViewEvent* pAppWidgetPopupEvent = new (std::nothrow) _AppWidgetPopupViewEvent(source);
+ SysTryReturn(NID_UI_CTRL, pAppWidgetPopupEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+
+ return pAppWidgetPopupEvent;
+}
+
+const _Control*
+_AppWidgetPopupViewEvent::GetSource(void) const
+{
+ return __pSource;
+}
+
+void
+_AppWidgetPopupViewEvent::FireImpl(IEventListener& pListener, const IEventArg& arg)
+{
+ _IAppWidgetPopupViewEventListener* pAppWidgetPopupViewEventListener = dynamic_cast<_IAppWidgetPopupViewEventListener*>(&pListener);
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidgetPopupViewEventListener, E_INVALID_ARG, "[E_INVALID_ARG] The invalid listener was given.\n");
+
+ const _AppWidgetPopupEventArg* pAppWidgetPopupEventArg = dynamic_cast <const _AppWidgetPopupEventArg*>(&arg);
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidgetPopupEventArg, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given.\n");
+
+ if ( pAppWidgetPopupEventArg->IsOpened() )
+ {
+ pAppWidgetPopupViewEventListener->OnAppWidgetPopupViewOpened();
+ }
+ else
+ {
+ pAppWidgetPopupViewEventListener->OnAppWidgetPopupViewClosed();
+ }
+}
+
+IEventArg*
+_AppWidgetPopupViewEvent::CreateAppWidgetPopupViewEventArgN(bool open)
+{
+ _AppWidgetPopupEventArg* pEventArg = new (std::nothrow) _AppWidgetPopupEventArg(open);
+ SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
+
+ return pEventArg;
+}
+
+}} // Tizen::Shell
// limitations under the License.
//
/**
- * @file FShell_LiveboxPopupViewEvent.h
- * @brief This is the header file for _LiveboxPopupViewEvent class.
+ * @file FShell_AppWidgetPopupViewEvent.h
+ * @brief This is the header file for _AppWidgetPopupViewEvent class.
*
*/
-#ifndef _FSHELL_INTERNAL_LIVEBOX_POPUP_VIEW_EVENT_H_
-#define _FSHELL_INTERNAL_LIVEBOX_POPUP_VIEW_EVENT_H_
+#ifndef _FSHELL_INTERNAL_APPWIDGET_POPUP_VIEW_EVENT_H_
+#define _FSHELL_INTERNAL_APPWIDGET_POPUP_VIEW_EVENT_H_
#include <FBaseResult.h>
#include <FBaseRt_Event.h>
namespace Tizen { namespace Shell
{
-class _LiveboxPopupViewEvent
+class _AppWidgetPopupViewEvent
: public Tizen::Base::Runtime::_Event
{
public:
- _LiveboxPopupViewEvent(const Tizen::Ui::_Control& source);
- virtual ~_LiveboxPopupViewEvent(void);
+ _AppWidgetPopupViewEvent(const Tizen::Ui::_Control& source);
+ virtual ~_AppWidgetPopupViewEvent(void);
- static _LiveboxPopupViewEvent* CreateInstanceN(const Tizen::Ui::_Control& source);
+ static _AppWidgetPopupViewEvent* CreateInstanceN(const Tizen::Ui::_Control& source);
public:
const Tizen::Ui::_Control* GetSource(void) const;
- static Tizen::Base::Runtime::IEventArg* CreateLiveboxPopupViewEventArgN(bool open);
+ static Tizen::Base::Runtime::IEventArg* CreateAppWidgetPopupViewEventArgN(bool open);
protected:
virtual void FireImpl(Tizen::Base::Runtime::IEventListener& pListener, const Tizen::Base::Runtime::IEventArg& arg);
private:
- _LiveboxPopupViewEvent(const _LiveboxPopupViewEvent& rhs);
- _LiveboxPopupViewEvent& operator=(const _LiveboxPopupViewEvent& rhs);
+ _AppWidgetPopupViewEvent(const _AppWidgetPopupViewEvent& rhs);
+ _AppWidgetPopupViewEvent& operator=(const _AppWidgetPopupViewEvent& rhs);
private:
const Tizen::Ui::_Control* __pSource;
-}; // _LiveboxPopupViewEvent
+}; // _AppWidgetPopupViewEvent
}} // Tizen::Shell
-#endif // _FSHELL_INTERNAL_LIVEBOX_POPUP_VIEW_EVENT_H_
+#endif // _FSHELL_INTERNAL_APPWIDGET_POPUP_VIEW_EVENT_H_
// limitations under the License.
//
/**
- * @file FShell_LiveboxPopupViewPresenter.cpp
- * @brief This is the implementation file for the _LiveboxPopupViewPresenter class.
+ * @file FShell_AppWidgetPopupViewPresenter.cpp
+ * @brief This is the implementation file for the _AppWidgetPopupViewPresenter class.
*/
#include <unique_ptr.h>
#include <FBaseSysLog.h>
-#include "FShell_LiveboxPopupViewPresenter.h"
-#include "FShell_LiveboxPopupView.h"
+#include "FShell_AppWidgetPopupViewPresenter.h"
+#include "FShell_AppWidgetPopupView.h"
using namespace std;
using namespace Tizen::Base;
namespace Tizen { namespace Shell
{
-_LiveboxPopupViewPresenter::_LiveboxPopupViewPresenter(const _LiveboxPopupView& liveboxPopupView)
- : __pLiveboxPopupView(null)
+_AppWidgetPopupViewPresenter::_AppWidgetPopupViewPresenter(const _AppWidgetPopupView& appwidgetPopupView)
+ : __pAppWidgetPopupView(null)
{
- __pLiveboxPopupView = const_cast <_LiveboxPopupView*>(&liveboxPopupView);
+ __pAppWidgetPopupView = const_cast <_AppWidgetPopupView*>(&appwidgetPopupView);
}
-_LiveboxPopupViewPresenter::~_LiveboxPopupViewPresenter(void)
+_AppWidgetPopupViewPresenter::~_AppWidgetPopupViewPresenter(void)
{
- __pLiveboxPopupView = null;
+ __pAppWidgetPopupView = null;
}
void
-_LiveboxPopupViewPresenter::Draw(void)
+_AppWidgetPopupViewPresenter::Draw(void)
{
- Bitmap* pBitmap = __pLiveboxPopupView->GetBitmap();
+ Bitmap* pBitmap = __pAppWidgetPopupView->GetBitmap();
SysTryReturnVoidResult(NID_UI_CTRL, pBitmap, E_SYSTEM, "Bitmap is invalid.");
- unique_ptr<Canvas> pCanvas(__pLiveboxPopupView->GetCanvasN());
+ unique_ptr<Canvas> pCanvas(__pAppWidgetPopupView->GetCanvasN());
SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
--- /dev/null
+//
+// 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_AppWidgetPopupViewPresenter.h
+ * @brief This is the header file for the _AppWidgetPopupViewPresenter class.
+ *
+ * This header file contains the declarations of the %_AppWidgetPopupViewPresenter class.
+ */
+#ifndef _FSHELL_INTERNAL_APPWIDGET_POPUP_VIEW_PRESENTER_H_
+#define _FSHELL_INTERNAL_APPWIDGET_POPUP_VIEW_PRESENTER_H_
+
+namespace Tizen { namespace Shell
+{
+
+class _AppWidgetPopupView;
+
+class _AppWidgetPopupViewPresenter
+{
+public:
+ _AppWidgetPopupViewPresenter(const _AppWidgetPopupView& appwidgetPopupView);
+ virtual ~_AppWidgetPopupViewPresenter(void);
+
+ void Draw(void);
+
+private:
+ _AppWidgetPopupViewPresenter(const _AppWidgetPopupViewPresenter& rhs);
+ _AppWidgetPopupViewPresenter& operator =(const _AppWidgetPopupViewPresenter& rhs);
+
+private:
+ _AppWidgetPopupView* __pAppWidgetPopupView;
+}; // _AppWidgetPopupViewPresenter
+
+}} // Tizen::Shell
+
+#endif // _FSHELL_INTERNAL_APPWIDGET_POPUP_VIEW_PRESENTER_H_
--- /dev/null
+//
+// 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_AppWidgetProviderImpl.cpp
+ * @brief This is the implementation for the _AppWidgetProviderImpl class.
+ */
+
+#include <FBase.h>
+#include <FShellAppWidgetFrame.h>
+
+#include "FShell_AppWidgetProviderImpl.h"
+#include "FShell_AppWidgetFrameImpl.h"
+
+namespace Tizen { namespace Shell
+{
+
+using namespace Tizen::Base;
+
+_AppWidgetProviderImpl::_AppWidgetProviderImpl(const String& instanceId)
+ :__instanceId(instanceId)
+ ,__pAppWidgetFrame(null)
+{
+
+}
+
+_AppWidgetProviderImpl::~_AppWidgetProviderImpl()
+{
+ delete __pAppWidgetFrame;
+}
+
+const String&
+_AppWidgetProviderImpl::GetInstanceId() const
+{
+ return __instanceId;
+}
+
+result
+_AppWidgetProviderImpl::SetAppWidgetFrame(AppWidgetFrame* pAppWidgetFrame)
+{
+ if( __pAppWidgetFrame == pAppWidgetFrame)
+ {
+ return E_SUCCESS;
+ }
+
+ __pAppWidgetFrame = pAppWidgetFrame;
+
+ if( pAppWidgetFrame == null)
+ {
+ return E_SUCCESS;
+ }
+
+ _AppWidgetFrameImpl* pAppWidgetFrameImpl = _AppWidgetFrameImpl::GetInstance(*pAppWidgetFrame);
+// SysAssertf(pAppWidgetFrameImpl != null, "Not-yet constructed! Construct() should be called before use.");
+ SysTryReturnResult(NID_APP, pAppWidgetFrameImpl, E_INVALID_OPERATION, "Not-yet constructed! AppWidgetFrame::Construct() should be called before use.");
+
+ result r = pAppWidgetFrameImpl->SetProviderId(GetInstanceId());
+ SysTryReturnResult(NID_APP, !IsFailed(r), E_SYSTEM, "Failed to invoke _AppWidgetFrameImpl::SetProviderId.");
+
+ return E_SUCCESS;
+}
+
+AppWidgetFrame*
+_AppWidgetProviderImpl::GetAppWidgetFrame() const
+{
+ return __pAppWidgetFrame;
+}
+
+}} // Tizen::Shell
//
/**
- * @file FShell_LiveboxInfoImpl.cpp
- * @brief This is the implementation for the _LiveboxInfoImpl class.
+ * @file FShell_AppWidgetInfoImpl.cpp
+ * @brief This is the implementation for the _AppWidgetInfoImpl class.
*/
#include <unique_ptr.h>
#include <FBase.h>
#include <FBaseSysLog.h>
#include <FBase_StringConverter.h>
-#include <FShellLiveboxProviderInfo.h>
-#include <FShellLiveboxSizeInfo.h>
-#include "FShell_LiveboxManagerImpl.h"
-#include "FShell_LiveboxProviderInfoImpl.h"
-#include "FShell_LiveboxSizeInfoImpl.h"
+#include <FShellAppWidgetProviderInfo.h>
+#include <FShellAppWidgetSizeInfo.h>
+#include "FShell_AppWidgetManagerImpl.h"
+#include "FShell_AppWidgetProviderInfoImpl.h"
+#include "FShell_AppWidgetSizeInfoImpl.h"
namespace Tizen { namespace Shell {
using namespace Tizen::Graphics;
-_LiveboxProviderInfoImpl::_LiveboxProviderInfoImpl(const Tizen::App::AppId& appId, const Tizen::Base::String& name)
+_AppWidgetProviderInfoImpl::_AppWidgetProviderInfoImpl(const Tizen::App::AppId& appId, const Tizen::Base::String& name)
:__appId(appId)
,__name(name)
,__isDefault(false)
{
- __providerId = _LiveboxManagerImpl::MakeProviderName(appId, name);
+ __providerId = _AppWidgetManagerImpl::MakeProviderName(appId, name);
std::unique_ptr<char[]> pProviderId(_StringConverter::CopyToCharArrayN(__providerId));
__displayName = livebox_service_i18n_name(pProviderId.get(), null);
SysLog(NID_APP, "%ls.%ls, displayName(%ls), configuration(%ls)", appId.GetPointer(), name.GetPointer(), __displayName.GetPointer(), __configurationAppControlAppId.GetPointer() );
}
-/*_LiveboxProviderInfoImpl::_LiveboxProviderInfoImpl(const _LiveboxProviderInfoImpl& rhs)
+/*_AppWidgetProviderInfoImpl::_AppWidgetProviderInfoImpl(const _AppWidgetProviderInfoImpl& rhs)
{
__appId = rhs.__appId;
__name = rhs.__name;
__providerId = rhs.__providerId;
}
-_LiveboxProviderInfoImpl&
-_LiveboxProviderInfoImpl::operator =(const _LiveboxProviderInfoImpl& rhs)
+_AppWidgetProviderInfoImpl&
+_AppWidgetProviderInfoImpl::operator =(const _AppWidgetProviderInfoImpl& rhs)
{
__appId = rhs.__appId;
__name = rhs.__name;
return *this;
}*/
-_LiveboxProviderInfoImpl::~_LiveboxProviderInfoImpl()
+_AppWidgetProviderInfoImpl::~_AppWidgetProviderInfoImpl()
{
}
Tizen::App::AppId
-_LiveboxProviderInfoImpl::GetAppId() const
+_AppWidgetProviderInfoImpl::GetAppId() const
{
return __appId;
}
Tizen::Base::String
-_LiveboxProviderInfoImpl::GetName() const
+_AppWidgetProviderInfoImpl::GetName() const
{
return __name;
}
Tizen::Base::String
-_LiveboxProviderInfoImpl::GetDisplayName() const
+_AppWidgetProviderInfoImpl::GetDisplayName() const
{
/* std::unique_ptr<char[]> pPackageId(_StringConverter::CopyToCharArrayN(__providerId));
__displayName = livebox_service_i18n_name(pPackageId.get(), null);*/
}
Tizen::Base::String
-_LiveboxProviderInfoImpl::GetIconPath() const
+_AppWidgetProviderInfoImpl::GetIconPath() const
{
std::unique_ptr<char[]> pPackageId(_StringConverter::CopyToCharArrayN(__providerId));
String iconPath = livebox_service_i18n_icon(pPackageId.get(), null);
}
Tizen::Base::String
-_LiveboxProviderInfoImpl::GetConfigurationAppControlAppId() const
+_AppWidgetProviderInfoImpl::GetConfigurationAppControlAppId() const
{
return __configurationAppControlAppId;
}
bool
-_LiveboxProviderInfoImpl::IsDefault() const
+_AppWidgetProviderInfoImpl::IsDefault() const
{
return __isDefault;
}
Tizen::Base::Collection::IList*
-_LiveboxProviderInfoImpl::GetSizeInfoListN() const
+_AppWidgetProviderInfoImpl::GetSizeInfoListN() const
{
const int SUPPORTED_SIZE_TYPE_MAX = 6;
std::unique_ptr<char[]> pPackageId(_StringConverter::CopyToCharArrayN(__providerId));
livebox_service_get_supported_sizes(pPackageId.get(), &supportedSizeCount , widthArray, heightArray);
- SysTryReturn(NID_APP, supportedSizeCount > 0, null, E_INVALID_ARG, "[E_INVALID_ARG] There is no livebox of provider(%ls)",__providerId.GetPointer() );
+ SysTryReturn(NID_APP, supportedSizeCount > 0, null, E_INVALID_ARG, "[E_INVALID_ARG] There is no appwidget of provider(%ls)",__providerId.GetPointer() );
std::unique_ptr<ArrayList> pSizes(new (std::nothrow) ArrayList);
SysTryReturn(NID_APP, pSizes, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory for ArrayList." );
{
size.SetSize(widthArray[i], heightArray[i]);
previewImagePath = livebox_service_preview(pPackageId.get(), livebox_service_size_type(static_cast<int>(size.width), static_cast<int>(size.height) ) );
- std::unique_ptr<LiveboxSizeInfo> pLiveboxSizeInfo(_LiveboxSizeInfoImpl::CreateLiveboxSizeInfo(size, previewImagePath) );
- SysTryReturn(NID_APP, pLiveboxSizeInfo, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory for LiveboxSizeInfo." );
- pSizes->Add( *pLiveboxSizeInfo.release() );
+ std::unique_ptr<AppWidgetSizeInfo> pAppWidgetSizeInfo(_AppWidgetSizeInfoImpl::CreateAppWidgetSizeInfo(size, previewImagePath) );
+ SysTryReturn(NID_APP, pAppWidgetSizeInfo, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory for AppWidgetSizeInfo." );
+ pSizes->Add( *pAppWidgetSizeInfo.release() );
}
return pSizes.release();
}
-LiveboxProviderInfo*
-_LiveboxProviderInfoImpl::GetLiveboxProviderInfoN(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName)
+AppWidgetProviderInfo*
+_AppWidgetProviderInfoImpl::GetAppWidgetProviderInfoN(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName)
{
- return new (std::nothrow) LiveboxProviderInfo(appId, providerName);
+ return new (std::nothrow) AppWidgetProviderInfo(appId, providerName);
}
-LiveboxProviderInfo*
-_LiveboxProviderInfoImpl::GetLiveboxProviderInfoN(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, bool isDefault)
+AppWidgetProviderInfo*
+_AppWidgetProviderInfoImpl::GetAppWidgetProviderInfoN(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, bool isDefault)
{
- LiveboxProviderInfo* pInfo = new (std::nothrow) LiveboxProviderInfo(appId, providerName);
- SysTryReturn(NID_APP, pInfo, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory for LiveboxProviderInfo." );
+ AppWidgetProviderInfo* pInfo = new (std::nothrow) AppWidgetProviderInfo(appId, providerName);
+ SysTryReturn(NID_APP, pInfo, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory for AppWidgetProviderInfo." );
- _LiveboxProviderInfoImpl::GetImpl(*pInfo)->__isDefault = isDefault;
+ _AppWidgetProviderInfoImpl::GetImpl(*pInfo)->__isDefault = isDefault;
return pInfo;
}
-_LiveboxProviderInfoImpl*
-_LiveboxProviderInfoImpl::GetImpl(const LiveboxProviderInfo& liveboxProviderInfo)
+_AppWidgetProviderInfoImpl*
+_AppWidgetProviderInfoImpl::GetImpl(const AppWidgetProviderInfo& appwidgetProviderInfo)
{
- return static_cast<_LiveboxProviderInfoImpl*>(liveboxProviderInfo.__pLiveboxProviderInfoImpl);
+ return static_cast<_AppWidgetProviderInfoImpl*>(appwidgetProviderInfo.__pAppWidgetProviderInfoImpl);
}
-} /* namespace Livebox */
+} /* namespace AppWidget */
} /* namespace Samsung */
//
/**
- * @file FShell_LiveboxManagerImpl.cpp
- * @brief This is the implementation for the _LiveboxManagerImpl class.
+ * @file FShell_AppWidgetManagerImpl.cpp
+ * @brief This is the implementation for the _AppWidgetManagerImpl class.
*/
#include <unique_ptr.h>
#include <FAppPkg_PackageManagerImpl.h>
#include <FBase_StringConverter.h>
-#include <FShellLiveboxProviderInfo.h>
-#include <FShellLiveboxProvider.h>
-#include <FShellLiveboxPopupProvider.h>
-#include <FShellLiveboxFrame.h>
-#include <FShellLiveboxPopup.h>
+#include <FShellAppWidgetProviderInfo.h>
+#include <FShellAppWidgetProvider.h>
+#include <FShellAppWidgetPopupProvider.h>
+#include <FShellAppWidgetFrame.h>
+#include <FShellAppWidgetPopup.h>
-#include <FShellILiveboxProviderFactory.h>
-#include <FShellILiveboxPopupProviderFactory.h>
+#include <FShellIAppWidgetProviderFactory.h>
+#include <FShellIAppWidgetPopupProviderFactory.h>
-#include <FShell_ILiveboxTouchEventListener.h>
+#include <FShell_IAppWidgetTouchEventListener.h>
#include <FShell_TemplateUtil.h>
-#include "FShell_LiveboxManagerProxy.h"
-#include "FShell_LiveboxProviderManagerImpl.h"
+#include "FShell_AppWidgetManagerProxy.h"
+#include "FShell_AppWidgetProviderManagerImpl.h"
-#include "FShell_LiveboxProviderInfoImpl.h"
+#include "FShell_AppWidgetProviderInfoImpl.h"
namespace Tizen { namespace Shell
{
namespace
{
-const char LIVEBOX_ON_ADD[] = "Livebox='event=add'";
-const char LIVEBOX_ON_REMOVE[] = "Livebox='event=remove'";
-const char LIVEBOX_ON_UPDATE[] = "Livebox='event=update'";
-const char LIVEBOX_ON_RESIZE[] = "Livebox='event=resize'";
-const char LIVEBOX_ON_TOUCH[] = "Livebox='event=touch'";
-const char LIVEBOX_TRAY_ON_CREATE[] = "LiveboxTray='event=create'";
-const char LIVEBOX_TRAY_ON_DESTROY[] = "LiveboxTray='event=destroy'";
-const char LIVEBOX_TRAY_ON_TOUCH[] = "LiveboxTray='event=touch'";
+const char APPWIDGET_ON_ADD[] = "http://tizen.org/appcontrol/appwidget/add";
+const char APPWIDGET_ON_REMOVE[] = "http://tizen.org/appcontrol/appwidget/remove";
+const char APPWIDGET_ON_UPDATE[] = "http://tizen.org/appcontrol/appwidget/update";
+const char APPWIDGET_ON_RESIZE[] = "http://tizen.org/appcontrol/appwidget/resize";
+const char APPWIDGET_ON_TOUCH[] = "http://tizen.org/appcontrol/appwidget/touch";
+const char APPWIDGET_POPUP_ON_CREATE[] = "http://tizen.org/appcontrol/appwidgetpopup/create";
+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_INSTANCE_ID = L"_InstanceId";
const String ARG_KEY_PROVIDER_NAME = L"_ProviderName";
const String ARG_KEY_Y = L"_Y";
}
-_LiveboxProviderManagerImpl::_LiveboxProviderManagerImpl()
- :__pLiveboxFactory(null)
- ,__pLiveboxPopupProviderFactory(null)
- ,__pLiveboxPopupProvider(null)
- ,__LiveboxPopupTouchEventListener(null)
+_AppWidgetProviderManagerImpl::_AppWidgetProviderManagerImpl()
+ :__pAppWidgetFactory(null)
+ ,__pAppWidgetPopupProviderFactory(null)
+ ,__pAppWidgetPopupProvider(null)
+ ,__AppWidgetPopupTouchEventListener(null)
// ,__messageReceived(false)
{
SysLog(NID_APP, "");
}
-_LiveboxProviderManagerImpl::~_LiveboxProviderManagerImpl()
+_AppWidgetProviderManagerImpl::~_AppWidgetProviderManagerImpl()
{
SysLog(NID_APP, "");
}
-_LiveboxProviderManagerImpl*
-_LiveboxProviderManagerImpl::GetInstance()
+_AppWidgetProviderManagerImpl*
+_AppWidgetProviderManagerImpl::GetInstance()
{
- static _LiveboxProviderManagerImpl* __pLiveboxManagerImpl = null;
- if( __pLiveboxManagerImpl == null)
+ static _AppWidgetProviderManagerImpl* __pAppWidgetManagerImpl = null;
+ if( __pAppWidgetManagerImpl == null)
{
- __pLiveboxManagerImpl = new (std::nothrow)_LiveboxProviderManagerImpl;
- SysTryReturn(NID_APP, __pLiveboxManagerImpl, null, E_OUT_OF_MEMORY, "Allocating new _LiveboxManagerProxy failed.");
+ __pAppWidgetManagerImpl = new (std::nothrow)_AppWidgetProviderManagerImpl;
+ SysTryReturn(NID_APP, __pAppWidgetManagerImpl, null, E_OUT_OF_MEMORY, "Allocating new _AppWidgetManagerProxy failed.");
- result r = __pLiveboxManagerImpl->Construct();
+ result r = __pAppWidgetManagerImpl->Construct();
SysTryReturn(NID_APP, !IsFailed(r), null, r, "[%s] Propagating.", GetErrorMessage(r));
}
- return __pLiveboxManagerImpl;
+ return __pAppWidgetManagerImpl;
}
result
-_LiveboxProviderManagerImpl::Construct()
+_AppWidgetProviderManagerImpl::Construct()
{
SysLog(NID_APP, "Enter.");
- __liveboxProviders.Construct();
+ __appwidgetProviders.Construct();
__touchEventListeners.Construct();
Tizen::App::_AppImpl::GetInstance()->SetAppControlProviderInternalEventListener(this);
}
result
-_LiveboxProviderManagerImpl::SetLiveboxProviderFactory(ILiveboxProviderFactory& factory)
+_AppWidgetProviderManagerImpl::SetAppWidgetProviderFactory(IAppWidgetProviderFactory& factory)
{
- result r = ValidateApplicationAttributeForLivebox();
- SysTryReturnResult(NID_APP, !IsFailed(r), E_INVALID_OPERATION, "This application can't export Livebox provider.");
+ result r = ValidateApplicationAttributeForAppWidget();
+ SysTryReturnResult(NID_APP, !IsFailed(r), E_INVALID_OPERATION, "This application can't export AppWidget provider.");
- __pLiveboxFactory = &factory;
+ __pAppWidgetFactory = &factory;
return E_SUCCESS;
}
const int LIFE_DURATION_MIN = 30000;
result
-_LiveboxProviderManagerImpl::ValidateApplicationAttributeForLivebox(void)
+_AppWidgetProviderManagerImpl::ValidateApplicationAttributeForAppWidget(void)
{
HashMapT<String, _AppFeatureInfoImpl*>* pInfo = _PackageManagerImpl::GetInstance()->GetPackageAppFeatureMapN(_AppInfo::GetPackageId(), _AppInfo::GetAppExecutableName());
SysTryReturnResult(NID_APP, pInfo, E_SYSTEM, "Failed to invoke _PackageManagerImpl::GetPackageAppFeatureMapN()");
SysTryReturnResult(NID_APP, !IsFailed(r), E_INVALID_OPERATION, "Can't find %ls attribute for the ServiceApp in package information.", USE_UI_KEY );
const String& useUi = pFeature->GetValue();
- SysTryReturnResult(NID_APP, useUi == USE_UI_VAL_TRUE, E_INVALID_OPERATION, "%ls attribute value should be '%ls' to be an application that providing Livebox, but value is %ls", USE_UI_KEY, USE_UI_VAL_TRUE, useUi.GetPointer() );
+ SysTryReturnResult(NID_APP, useUi == USE_UI_VAL_TRUE, E_INVALID_OPERATION, "%ls attribute value should be '%ls' to be an application that providing AppWidget, but value is %ls", USE_UI_KEY, USE_UI_VAL_TRUE, useUi.GetPointer() );
r = pInfo->GetValue(LIFE_DURATION_KEY, pFeature);
SysTryReturnResult(NID_APP, !IsFailed(r), E_INVALID_OPERATION, "Can't find %ls attribute for the ServiceApp in package information.", LIFE_DURATION_KEY );
int lifeDuration = 0;
r = Tizen::Base::Integer::Parse(lifeDurationValue, lifeDuration);
SysTryReturnResult(NID_APP, !IsFailed(r), E_INVALID_OPERATION, "Failed to parse %ls attribute for the ServiceApp in package information.", LIFE_DURATION_KEY );
-// SysTryReturnResult(NID_APP, lifeDuration <= LIFE_DURATION_MIN, E_INVALID_OPERATION, "%ls attribute value should be less than '%d' to be an application that providing Livebox, but value is %d", LIFE_DURATION_KEY, LIFE_DURATION_MIN, lifeDuration );
+// SysTryReturnResult(NID_APP, lifeDuration <= LIFE_DURATION_MIN, E_INVALID_OPERATION, "%ls attribute value should be less than '%d' to be an application that providing AppWidget, but value is %d", LIFE_DURATION_KEY, LIFE_DURATION_MIN, lifeDuration );
return E_SUCCESS;
}
result
-_LiveboxProviderManagerImpl::SetLiveboxPopupProviderFactory(ILiveboxPopupProviderFactory& factory)
+_AppWidgetProviderManagerImpl::SetAppWidgetPopupProviderFactory(IAppWidgetPopupProviderFactory& factory)
{
- result r = ValidateApplicationAttributeForLivebox();
- SysTryReturnResult(NID_APP, !IsFailed(r), E_INVALID_OPERATION, "This application can't export Livebox provider.");
+ result r = ValidateApplicationAttributeForAppWidget();
+ SysTryReturnResult(NID_APP, !IsFailed(r), E_INVALID_OPERATION, "This application can't export AppWidget provider.");
- __pLiveboxPopupProviderFactory = &factory;
+ __pAppWidgetPopupProviderFactory = &factory;
return E_SUCCESS;
}
result
-_LiveboxProviderManagerImpl::SetLiveboxTouchEventListener(const String& instanceId, _ILiveboxTouchEventListener& listener)
+_AppWidgetProviderManagerImpl::SetAppWidgetTouchEventListener(const String& instanceId, _IAppWidgetTouchEventListener& listener)
{
return __touchEventListeners.Add(instanceId, &listener);
}
result
-_LiveboxProviderManagerImpl::SetLiveboxPopupEventListener(_ILiveboxTouchEventListener& listener)
+_AppWidgetProviderManagerImpl::SetAppWidgetPopupEventListener(_IAppWidgetTouchEventListener& listener)
{
- __LiveboxPopupTouchEventListener = &listener;
+ __AppWidgetPopupTouchEventListener = &listener;
return E_SUCCESS;
}
result
-_LiveboxProviderManagerImpl::RequestUpdate(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Base::String& argument)
+_AppWidgetProviderManagerImpl::RequestUpdate(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Base::String& argument)
{
SysLog(NID_APP, "Enter.");
}
else*/
{
- _LiveboxManagerProxy* pProxy = _LiveboxManagerProxy::GetInstance();
+ _AppWidgetManagerProxy* pProxy = _AppWidgetManagerProxy::GetInstance();
SysTryReturnResult(NID_APP, pProxy, E_SYSTEM, "Failed to get proxy instance!");
return pProxy->RequestUpdate(appId, providerName, argument);
}
result
-_LiveboxProviderManagerImpl::RequestUpdateInstance(const Tizen::Base::String& instanceId, const Tizen::Base::String& argument)
+_AppWidgetProviderManagerImpl::RequestUpdateInstance(const Tizen::Base::String& instanceId, const Tizen::Base::String& argument)
{
- if(ContainsLivebox(instanceId))
+ if(ContainsAppWidget(instanceId))
{
- LiveboxProvider* pLiveboxProvider = null;
- __liveboxProviders.GetValue(instanceId, pLiveboxProvider);
+ AppWidgetProvider* pAppWidgetProvider = null;
+ __appwidgetProviders.GetValue(instanceId, pAppWidgetProvider);
- LiveboxFrame* pLiveBoxFrame = pLiveboxProvider->GetLiveboxFrame();
- SysTryReturnResult(NID_APP, pLiveBoxFrame, E_SYSTEM, "Failed to GetLiveboxFrame");
+ AppWidgetFrame* pAppWidgetFrame = pAppWidgetProvider->GetAppWidgetFrame();
+ SysTryReturnResult(NID_APP, pAppWidgetFrame, E_SYSTEM, "Failed to GetAppWidgetFrame");
- pLiveboxProvider->OnLiveboxProviderUpdating(argument);
+ pAppWidgetProvider->OnAppWidgetProviderUpdating(argument);
}
else
{
- _LiveboxManagerProxy* pProxy = _LiveboxManagerProxy::GetInstance();
+ _AppWidgetManagerProxy* pProxy = _AppWidgetManagerProxy::GetInstance();
SysTryReturnResult(NID_APP, pProxy, E_SYSTEM, "Failed to get proxy instance!");
return pProxy->RequestUpdateInstance(instanceId, argument);
namespace
{
-int AddLiveboxCallback(int ret, int pid, void *data)
+int AddAppWidgetCallback(int ret, int pid, void *data)
{
if( ret != 0)
{
}
result
-_LiveboxProviderManagerImpl::AddLivebox(const Tizen::App::AppId& providerAppId, const Tizen::Base::String& providerName, const Tizen::Base::String& text, const Tizen::Base::String& userInfo)
+_AppWidgetProviderManagerImpl::AddAppWidget(const Tizen::App::AppId& providerAppId, const Tizen::Base::String& providerName, const Tizen::Base::String& text, const Tizen::Base::String& userInfo)
{
SysTryReturnResult(NID_APP, providerAppId.IsEmpty()==false, E_INVALID_ARG, "The providerAppId is empty.");
SysTryReturnResult(NID_APP, providerAppId.GetLength() < NATIVE_APP_MAX_APPID_LENGTH, E_INVALID_ARG, "The providerAppId is too long (Maximum %d bytes).", NATIVE_APP_MAX_APPID_LENGTH);
else
{
String localPackageId = _PackageManagerImpl::GetPackageIdByAppId(Tizen::App::App::GetInstance()->GetAppId());
- String liveboxProviderPackageId = _PackageManagerImpl::GetPackageIdByAppId(providerAppId);
- if( localPackageId != liveboxProviderPackageId)
+ String appwidgetProviderPackageId = _PackageManagerImpl::GetPackageIdByAppId(providerAppId);
+ if( localPackageId != appwidgetProviderPackageId)
{
SysLog(NID_APP, "[E_INVALID_OPERATION] but allowed to test");
//TODO:return E_INVALID_OPERATION
std::unique_ptr<char[]> pContent(_StringConverter::CopyToCharArrayN(userInfo));
std::unique_ptr<char[]> pIcon(_StringConverter::CopyToCharArrayN(iconPath));
- int ret = add_to_home_livebox(pProviderId.get(), pName.get(), LIVEBOX_TYPE_DEFAULT, pContent.get(), pIcon.get(), -1.0l, AddLiveboxCallback, this);
+ int ret = add_to_home_livebox(pProviderId.get(), pName.get(), LIVEBOX_TYPE_DEFAULT, pContent.get(), pIcon.get(), -1.0l, AddAppWidgetCallback, this);
SysTryReturnResult(NID_APP, ret != -ENOTCONN, E_CONNECTION_FAILED, "[E_CONNECTION_FAILED] failed to add_to_home_livebox");
SysTryReturnResult(NID_APP, ret == 0, E_SYSTEM, "[E_SYSTEM] failed to add_to_home_livebox (%s)", strerror(r));
}
bool
-_LiveboxProviderManagerImpl::ContainsLivebox(const String& instanceId) const
+_AppWidgetProviderManagerImpl::ContainsAppWidget(const String& instanceId) const
{
bool contains = false;
- __liveboxProviders.ContainsKey(instanceId, contains);
+ __appwidgetProviders.ContainsKey(instanceId, contains);
return contains;
}
//void
-//_LiveboxProviderManagerImpl::TerminateAppIfInvalidState()
+//_AppWidgetProviderManagerImpl::TerminateAppIfInvalidState()
//{
// if( __messageReceived == false )
// {
//}
void
-_LiveboxProviderManagerImpl::OnAppControlRequestReceived(RequestId reqId, const String& operationId, const String* pUri, const String* pMimeType, const IMap* pArgs)
+_AppWidgetProviderManagerImpl::OnAppControlRequestReceived(RequestId reqId, const String& operationId, const String* pUri, const String* pMimeType, const IMap* pArgs)
{
SysAssertf( pArgs, "[E_SYSTEN] pArgs should not be null.");
SysAssertf( pArgs->GetCount() > 0, "[E_SYSTEN] pArgs should have one more key-values.");
SysLog(NID_APP, "id(%ls), name(%ls), param(%ls)", pInstanceId->GetPointer(), pName->GetPointer(), pParam->GetPointer());
- if(operationId.StartsWith(L"LiveboxTray", 0) == true)
+ if(operationId.StartsWith(L"http://tizen.org/appcontrol/appwidgetpopup", 0) == true)
{
- SysTryReturnVoidResult(NID_APP, __pLiveboxPopupProviderFactory, E_FAILURE, "[E_FAILURE] __pLiveboxPopupProviderFactory is null");
- HandleLiveboxPopupRequest(operationId, pArgs);
+ SysTryReturnVoidResult(NID_APP, __pAppWidgetPopupProviderFactory, E_FAILURE, "[E_FAILURE] __pAppWidgetPopupProviderFactory is null");
+ HandleAppWidgetPopupRequest(operationId, pArgs);
}
else
{
- if(this->ContainsLivebox(*pInstanceId) == false)
+ if(this->ContainsAppWidget(*pInstanceId) == false)
{
- SysLog(NID_APP, "no livebox instance, creating..");
+ SysLog(NID_APP, "no appwidget instance, creating..");
int width = 0;
const String* pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_WIDTH));
SysTryReturnVoidResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_HEIGHT.GetPointer() );
Integer::Parse(*pValue, height);
- this->CreateLivebox( *pName, *pInstanceId, width, height, *pParam);
+ this->CreateAppWidget( *pName, *pInstanceId, width, height, *pParam);
- if(operationId == LIVEBOX_ON_RESIZE)
+ if(operationId == APPWIDGET_ON_RESIZE)
{
- SysLog(NID_APP, "operation is resize, but livebox is already recreated with new size, so OnSize won't be called.");
+ SysLog(NID_APP, "operation is resize, but appwidget is already recreated with new size, so OnSize won't be called.");
return;
}
}
- SysTryReturnVoidResult(NID_APP, __pLiveboxFactory, E_FAILURE, "[E_FAILURE] __pLiveboxFactory is null");
- HandleLiveboxRequest(operationId, pArgs);
+ SysTryReturnVoidResult(NID_APP, __pAppWidgetFactory, E_FAILURE, "[E_FAILURE] __pAppWidgetFactory is null");
+ HandleAppWidgetRequest(operationId, pArgs);
}
SysLog(NID_APP, "Exit");
}
result
-_LiveboxProviderManagerImpl::HandleLiveboxRequest(const Tizen::Base::String& operationId, const Tizen::Base::Collection::IMap* pArgs)
+_AppWidgetProviderManagerImpl::HandleAppWidgetRequest(const Tizen::Base::String& operationId, const Tizen::Base::Collection::IMap* pArgs)
{
if( pArgs == null || pArgs->GetCount() < 3)
{
SysLog(NID_APP, "id(%ls), name(%d)", pInstanceId->GetPointer(), pName->GetPointer());*/
- /*if( operationId == LIVEBOX_ON_ADD )
+ /*if( operationId == APPWIDGET_ON_ADD )
{
int w = 0;
int h = 0;
SysTryReturnResult(NID_APP, pValue, E_FAILURE, "[E_FAILURE]");
Integer::Parse(*pValue, h);
- this->__pLiveboxEventListener->OnLiveboxAdded(*pId, width, height, pArgs);
+ this->__pAppWidgetEventListener->OnAppWidgetAdded(*pId, width, height, pArgs);
}*/
- if (operationId == LIVEBOX_ON_RESIZE)
+ if (operationId == APPWIDGET_ON_RESIZE)
{
int width = 0;
int height = 0;
SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_HEIGHT.GetPointer() );
Integer::Parse(*pValue, height);
- this->ResizeLivebox(*pInstanceId, width, height);
+ this->ResizeAppWidget(*pInstanceId, width, height);
}
- else if (operationId == LIVEBOX_ON_UPDATE)
+ else if (operationId == APPWIDGET_ON_UPDATE)
{
int width = 0;
int height = 0;
pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_ARGUMENT));
SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_ARGUMENT.GetPointer() );
- this->UpdateLivebox(*pInstanceId, width, height, *pValue);
+ this->UpdateAppWidget(*pInstanceId, width, height, *pValue);
}
- else if (operationId == LIVEBOX_ON_REMOVE)
+ else if (operationId == APPWIDGET_ON_REMOVE)
{
- this->RemoveLivebox(*pInstanceId, true);
+ this->RemoveAppWidget(*pInstanceId, true);
}
- else if (operationId == LIVEBOX_ON_TOUCH)
+ else if (operationId == APPWIDGET_ON_TOUCH)
{
int eventType = 0;
double timeStamp = 0.0f;
}
result
-_LiveboxProviderManagerImpl::HandleLiveboxPopupRequest(const Tizen::Base::String& operationId, const Tizen::Base::Collection::IMap* pArgs)
+_AppWidgetProviderManagerImpl::HandleAppWidgetPopupRequest(const Tizen::Base::String& operationId, const Tizen::Base::Collection::IMap* pArgs)
{
- SysTryReturnResult(NID_APP, __pLiveboxPopupProviderFactory, E_FAILURE, "[E_FAILURE] __pLiveboxPopupProviderFactory is null");
+ SysTryReturnResult(NID_APP, __pAppWidgetPopupProviderFactory, E_FAILURE, "[E_FAILURE] __pAppWidgetPopupProviderFactory is null");
if( pArgs == null || pArgs->GetCount() < 3)
{
SysAssertf(pArgs, "[E_SYSTEN] pArgs should not be null.");
const String* pInstanceId = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_INSTANCE_ID));
SysTryReturnResult(NID_APP, pInstanceId, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_INSTANCE_ID.GetPointer() );
- if (operationId == LIVEBOX_TRAY_ON_CREATE)
+ if (operationId == APPWIDGET_POPUP_ON_CREATE)
{
double x = 0;
double y = 0;
SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_HEIGHT.GetPointer() );
Integer::Parse(*pValue, height);
- this->CreateLiveboxPopupProvider(*pInstanceId, *pName, *pUserInfo, x, y, width, height);
+ this->CreateAppWidgetPopupProvider(*pInstanceId, *pName, *pUserInfo, x, y, width, height);
return E_SUCCESS;
}
- else if (operationId == LIVEBOX_TRAY_ON_DESTROY)
+ else if (operationId == APPWIDGET_POPUP_ON_DESTROY)
{
- this->DestroyLiveboxPopupProvider(*pInstanceId);
+ this->DestroyAppWidgetPopupProvider(*pInstanceId);
return E_SUCCESS;
}
- else if (operationId == LIVEBOX_TRAY_ON_TOUCH)
+ else if (operationId == APPWIDGET_POPUP_ON_TOUCH)
{
SysAssertf(pArgs->GetCount() == 6, "invalid argc(%d)", pArgs->GetCount() );
}
result
-_LiveboxProviderManagerImpl::CreateLivebox(const String& name, const String& instanceId, int width, int height, const String& userInfo)
+_AppWidgetProviderManagerImpl::CreateAppWidget(const String& name, const String& instanceId, int width, int height, const String& userInfo)
{
SysLog(NID_APP, "instanceId(%ls), w:%d, h:%d, userInfo:%ls", instanceId.GetPointer(), width, height, userInfo.GetPointer());
- SysTryReturnResult(NID_APP, __pLiveboxFactory, E_FAILURE, "[E_INVALID_OPERATION] __pLiveboxFactory should not be null");
+ SysTryReturnResult(NID_APP, __pAppWidgetFactory, E_FAILURE, "[E_INVALID_OPERATION] __pAppWidgetFactory should not be null");
- if( ContainsLivebox(instanceId))
+ if( ContainsAppWidget(instanceId))
{
- SysLog(NID_APP, "CreateLivebox invoke is duplicated!!");
- RemoveLivebox(instanceId, false);
+ SysLog(NID_APP, "CreateAppWidget invoke is duplicated!!");
+ RemoveAppWidget(instanceId, false);
}
- LiveboxProvider* pLivebox = __pLiveboxFactory->CreateInstance(name, width, height, userInfo);
- SysTryReturnResult(NID_APP, pLivebox, E_INVALID_OPERATION, "[E_INVALID_OPERATION]");
+ AppWidgetProvider* pAppWidget = __pAppWidgetFactory->CreateInstance(name, width, height, userInfo);
+ SysTryReturnResult(NID_APP, pAppWidget, E_INVALID_OPERATION, "[E_INVALID_OPERATION]");
- pLivebox->Construct(instanceId);
- __liveboxProviders.Add(instanceId, pLivebox);
+ pAppWidget->Construct(instanceId);
+ __appwidgetProviders.Add(instanceId, pAppWidget);
- pLivebox->OnLiveboxProviderInitializing(width, height, userInfo);
+ pAppWidget->OnAppWidgetProviderInitializing(width, height, userInfo);
- SysTryReturnResult(NID_APP, pLivebox->GetLiveboxFrame(), E_INVALID_OPERATION, "[E_INVALID_OPERATION]");
+ SysTryReturnResult(NID_APP, pAppWidget->GetAppWidgetFrame(), E_INVALID_OPERATION, "[E_INVALID_OPERATION]");
return E_SUCCESS;
}
result
-_LiveboxProviderManagerImpl::UpdateLivebox(const String& instanceId, int width, int height, const String& argument)
+_AppWidgetProviderManagerImpl::UpdateAppWidget(const String& instanceId, int width, int height, const String& argument)
{
SysLog(NID_APP, "instanceId(%ls), w:%d, h:%d, argument:%ls", instanceId.GetPointer(), width, height, argument.GetPointer() );
- LiveboxProvider* pLivebox = null;
- __liveboxProviders.GetValue(instanceId, pLivebox);
- SysTryReturnResult(NID_APP, pLivebox, E_SYSTEM, "Can't find the Livebox provider");
+ AppWidgetProvider* pAppWidget = null;
+ __appwidgetProviders.GetValue(instanceId, pAppWidget);
+ SysTryReturnResult(NID_APP, pAppWidget, E_SYSTEM, "Can't find the AppWidget provider");
- pLivebox->OnLiveboxProviderUpdating(argument);
+ pAppWidget->OnAppWidgetProviderUpdating(argument);
return E_SUCCESS;
}
result
-_LiveboxProviderManagerImpl::ResizeLivebox(const String& instanceId, int width, int height)
+_AppWidgetProviderManagerImpl::ResizeAppWidget(const String& instanceId, int width, int height)
{
SysLog(NID_APP, "instanceId(%ls), w:%d, h:%d", instanceId.GetPointer(), width, height);
- LiveboxProvider* pLivebox = null;
- __liveboxProviders.GetValue(instanceId, pLivebox);
- SysTryReturnResult(NID_APP, pLivebox, E_SYSTEM, "Can't find the Livebox provider");
+ AppWidgetProvider* pAppWidget = null;
+ __appwidgetProviders.GetValue(instanceId, pAppWidget);
+ SysTryReturnResult(NID_APP, pAppWidget, E_SYSTEM, "Can't find the AppWidget provider");
- LiveboxFrame* pLiveBoxFrame = pLivebox->GetLiveboxFrame();
- SysTryReturnResult(NID_APP, pLiveBoxFrame, E_SYSTEM, "GetLiveboxFrame() returns 'null'.");
+ AppWidgetFrame* pAppWidgetFrame = pAppWidget->GetAppWidgetFrame();
+ SysTryReturnResult(NID_APP, pAppWidgetFrame, E_SYSTEM, "GetAppWidgetFrame() returns 'null'.");
- return pLiveBoxFrame->SetSize(Dimension(width, height));
+ return pAppWidgetFrame->SetSize(Dimension(width, height));
}
result
-_LiveboxProviderManagerImpl::RemoveLivebox(const String& instanceId, bool terminateIfFinished)
+_AppWidgetProviderManagerImpl::RemoveAppWidget(const String& instanceId, bool terminateIfFinished)
{
SysLog(NID_APP, "instanceId(%ls), terminateIfFinished(%s)", instanceId.GetPointer(), (terminateIfFinished)? "true":"false" );
-// __pLiveboxEventListener->OnLiveboxRemoved(instanceId);
+// __pAppWidgetEventListener->OnAppWidgetRemoved(instanceId);
- LiveboxProvider* pLiveboxProvider = null;
- __liveboxProviders.GetValue(instanceId, pLiveboxProvider);
- result r = __liveboxProviders.Remove(instanceId);
+ AppWidgetProvider* pAppWidgetProvider = null;
+ __appwidgetProviders.GetValue(instanceId, pAppWidgetProvider);
+ result r = __appwidgetProviders.Remove(instanceId);
SysLog(NID_APP, "%s", GetErrorMessage(r) );
- if( pLiveboxProvider != null)
+ if( pAppWidgetProvider != null)
{
- delete pLiveboxProvider;
+ delete pAppWidgetProvider;
}
- SysLog(NID_APP, "(%d) provider(s) remains.", __liveboxProviders.GetCount() );
+ SysLog(NID_APP, "(%d) provider(s) remains.", __appwidgetProviders.GetCount() );
- if( terminateIfFinished && this->__liveboxProviders.GetCount() == 0)
+ if( terminateIfFinished && this->__appwidgetProviders.GetCount() == 0)
{
Tizen::App::App::GetInstance()->Terminate();
}
}
result
-_LiveboxProviderManagerImpl::CreateLiveboxPopupProvider(const String& instanceId, const String& providerName, const String& userInfo, double x, double y, int width, int height)
+_AppWidgetProviderManagerImpl::CreateAppWidgetPopupProvider(const String& instanceId, const String& providerName, const String& userInfo, double x, double y, int width, int height)
{
SysLog(NID_APP, "instanceId(%ls), providerName(%ls), userInfo(%ls), rect(%f, %f, %d, %d)", instanceId.GetPointer(), providerName.GetPointer(), userInfo.GetPointer(), x, y, width, height );
- SysTryReturnResult(NID_APP, __pLiveboxPopupProviderFactory, E_FAILURE, "[E_INVALID_OPERATION] __pLiveboxPopupProviderFactory should not be null");
+ SysTryReturnResult(NID_APP, __pAppWidgetPopupProviderFactory, E_FAILURE, "[E_INVALID_OPERATION] __pAppWidgetPopupProviderFactory should not be null");
- LiveboxPopupProvider* pPd = __pLiveboxPopupProviderFactory->CreateInstance(providerName, userInfo);
- __pLiveboxPopupProvider = pPd;
+ AppWidgetPopupProvider* pPd = __pAppWidgetPopupProviderFactory->CreateInstance(providerName, userInfo);
+ __pAppWidgetPopupProvider = pPd;
- __pLiveboxPopupProvider->Construct(instanceId, x, y);
- __pLiveboxPopupProvider->OnLiveboxPopupProviderInitializing(userInfo);
+ __pAppWidgetPopupProvider->Construct(instanceId, x, y);
+ __pAppWidgetPopupProvider->OnAppWidgetPopupProviderInitializing(userInfo);
- LiveboxPopup* pLiveBoxFrame = pPd->GetLiveboxPopup();
- SysTryReturnResult(NID_APP, pLiveBoxFrame, E_INVALID_OPERATION, "[E_INVALID_OPERATION] LiveboxPopup should be set using LiveboxPopupProvider::SetLiveboxPopup()");
+ AppWidgetPopup* pAppWidgetFrame = pPd->GetAppWidgetPopup();
+ SysTryReturnResult(NID_APP, pAppWidgetFrame, E_INVALID_OPERATION, "[E_INVALID_OPERATION] AppWidgetPopup should be set using AppWidgetPopupProvider::SetAppWidgetPopup()");
return E_SUCCESS;
}
result
-_LiveboxProviderManagerImpl::DestroyLiveboxPopupProvider(const String& instanceId)
+_AppWidgetProviderManagerImpl::DestroyAppWidgetPopupProvider(const String& instanceId)
{
SysLog(NID_APP, "instanceId(%ls)", instanceId.GetPointer());
- if( __pLiveboxPopupProvider != null)
+ if( __pAppWidgetPopupProvider != null)
{
- __pLiveboxPopupProvider->OnLiveboxPopupProviderTerminating();
- delete __pLiveboxPopupProvider;
- __pLiveboxPopupProvider = null;
+ __pAppWidgetPopupProvider->OnAppWidgetPopupProviderTerminating();
+ delete __pAppWidgetPopupProvider;
+ __pAppWidgetPopupProvider = null;
}
return E_SUCCESS;
}
result
-_LiveboxProviderManagerImpl::ForwardTouchEvent(const String& instanceId, int eventType, double timeStamp, double x, double y)
+_AppWidgetProviderManagerImpl::ForwardTouchEvent(const String& instanceId, int eventType, double timeStamp, double x, double y)
{
SysLog(NID_APP, "instanceId(%ls), eventType(%d), timeStamp(%f), x(%f), y(%f)", instanceId.GetPointer(), eventType, timeStamp, x, y);
- _ILiveboxTouchEventListener* pTouchEventListener = null;
+ _IAppWidgetTouchEventListener* pTouchEventListener = null;
__touchEventListeners.GetValue(instanceId, pTouchEventListener);
SysTryReturnResult(NID_APP, pTouchEventListener, E_INVALID_STATE, "[E_INVALID_STATE]");
}
result
-_LiveboxProviderManagerImpl::ForwardTouchEventForPD(const String& instanceId, int eventType, double timeStamp, double x, double y)
+_AppWidgetProviderManagerImpl::ForwardTouchEventForPD(const String& instanceId, int eventType, double timeStamp, double x, double y)
{
- SysTryReturnResult(NID_APP, __LiveboxPopupTouchEventListener, E_INVALID_STATE, "[E_INVALID_STATE]");
- __LiveboxPopupTouchEventListener->OnTouchEventRecevied(eventType, timeStamp, x, y);
+ SysTryReturnResult(NID_APP, __AppWidgetPopupTouchEventListener, E_INVALID_STATE, "[E_INVALID_STATE]");
+ __AppWidgetPopupTouchEventListener->OnTouchEventRecevied(eventType, timeStamp, x, y);
return E_SUCCESS;
}
//////////////////////////////////////////////////////////////////////////
result
-_LiveboxProviderManagerImpl::RequestSharedMemoryId(const Tizen::Base::String& instanceId, int width, int height, int& shmId)
+_AppWidgetProviderManagerImpl::RequestSharedMemoryId(const Tizen::Base::String& instanceId, int width, int height, int& shmId)
{
- _LiveboxManagerProxy* pProxy = _LiveboxManagerProxy::GetInstance();
+ _AppWidgetManagerProxy* pProxy = _AppWidgetManagerProxy::GetInstance();
SysTryReturnResult(NID_APP, pProxy, E_SYSTEM, "Failed to get proxy instance!");
return pProxy->RequestSharedMemoryId(instanceId, width, height, shmId);
}
result
-_LiveboxProviderManagerImpl::RequestSharedMemoryIdForPD(const Tizen::Base::String& instanceId, int width, int height, int& shmId)
+_AppWidgetProviderManagerImpl::RequestSharedMemoryIdForPD(const Tizen::Base::String& instanceId, int width, int height, int& shmId)
{
- _LiveboxManagerProxy* pProxy = _LiveboxManagerProxy::GetInstance();
+ _AppWidgetManagerProxy* pProxy = _AppWidgetManagerProxy::GetInstance();
SysTryReturnResult(NID_APP, pProxy, E_SYSTEM, "Failed to get proxy instance!");
return pProxy->RequestSharedMemoryIdForPD(instanceId, width, height, shmId);
}
result
-_LiveboxProviderManagerImpl::RequestReleaseSharedMemory(const Tizen::Base::String& instanceId)
+_AppWidgetProviderManagerImpl::RequestReleaseSharedMemory(const Tizen::Base::String& instanceId)
{
- _LiveboxManagerProxy* pProxy = _LiveboxManagerProxy::GetInstance();
+ _AppWidgetManagerProxy* pProxy = _AppWidgetManagerProxy::GetInstance();
SysTryReturnResult(NID_APP, pProxy, E_SYSTEM, "Failed to get proxy instance!");
return pProxy->RequestReleaseSharedMemory(instanceId);
}
result
-_LiveboxProviderManagerImpl::RequestReleaseSharedMemoryForPD(const Tizen::Base::String& instanceId)
+_AppWidgetProviderManagerImpl::RequestReleaseSharedMemoryForPD(const Tizen::Base::String& instanceId)
{
- _LiveboxManagerProxy* pProxy = _LiveboxManagerProxy::GetInstance();
+ _AppWidgetManagerProxy* pProxy = _AppWidgetManagerProxy::GetInstance();
SysTryReturnResult(NID_APP, pProxy, E_SYSTEM, "Failed to get proxy instance!");
return pProxy->RequestReleaseSharedMemoryForPD(instanceId);
}
result
-_LiveboxProviderManagerImpl::RequestSyncSharedMemory(const Tizen::Base::String& instanceId, int width, int height)
+_AppWidgetProviderManagerImpl::RequestSyncSharedMemory(const Tizen::Base::String& instanceId, int width, int height)
{
- _LiveboxManagerProxy* pProxy = _LiveboxManagerProxy::GetInstance();
+ _AppWidgetManagerProxy* pProxy = _AppWidgetManagerProxy::GetInstance();
SysTryReturnResult(NID_APP, pProxy, E_SYSTEM, "Failed to get proxy instance!");
return pProxy->RequestSyncSharedMemory(instanceId, width, height);
}
result
-_LiveboxProviderManagerImpl::RequestSyncSharedMemoryForPD(const Tizen::Base::String& instanceId)
+_AppWidgetProviderManagerImpl::RequestSyncSharedMemoryForPD(const Tizen::Base::String& instanceId)
{
- _LiveboxManagerProxy* pProxy = _LiveboxManagerProxy::GetInstance();
+ _AppWidgetManagerProxy* pProxy = _AppWidgetManagerProxy::GetInstance();
SysTryReturnResult(NID_APP, pProxy, E_SYSTEM, "Failed to get proxy instance!");
return pProxy->RequestSyncSharedMemoryForPD(instanceId);
//
/**
- * @file FShell_LiveboxSizeInfoImpl.cpp
- * @brief This is the implementation for the _LiveboxSizeInfoImpl class.
+ * @file FShell_AppWidgetSizeInfoImpl.cpp
+ * @brief This is the implementation for the _AppWidgetSizeInfoImpl class.
*/
#include <unique_ptr.h>
#include <FBase.h>
#include <FBaseSysLog.h>
#include <FBase_StringConverter.h>
-#include <FShellLiveboxProviderInfo.h>
-#include <FShellLiveboxSizeInfo.h>
+#include <FShellAppWidgetProviderInfo.h>
+#include <FShellAppWidgetSizeInfo.h>
-#include "FShell_LiveboxProviderInfoImpl.h"
-#include "FShell_LiveboxSizeInfoImpl.h"
+#include "FShell_AppWidgetProviderInfoImpl.h"
+#include "FShell_AppWidgetSizeInfoImpl.h"
using namespace Tizen::Base;
namespace Tizen { namespace Shell
{
-_LiveboxSizeInfoImpl::_LiveboxSizeInfoImpl(FloatDimension size, const String& previewImagePath)
+_AppWidgetSizeInfoImpl::_AppWidgetSizeInfoImpl(FloatDimension size, const String& previewImagePath)
{
__size = size;
__previewImagePath = previewImagePath;
}
-_LiveboxSizeInfoImpl::_LiveboxSizeInfoImpl(const _LiveboxSizeInfoImpl& rhs)
+_AppWidgetSizeInfoImpl::_AppWidgetSizeInfoImpl(const _AppWidgetSizeInfoImpl& rhs)
{
__size = rhs.__size;
__previewImagePath = rhs.__previewImagePath;
}
-_LiveboxSizeInfoImpl&
-_LiveboxSizeInfoImpl::operator =(const _LiveboxSizeInfoImpl& rhs)
+_AppWidgetSizeInfoImpl&
+_AppWidgetSizeInfoImpl::operator =(const _AppWidgetSizeInfoImpl& rhs)
{
__size = rhs.__size;
__previewImagePath = rhs.__previewImagePath;
return *this;
}
-_LiveboxSizeInfoImpl::~_LiveboxSizeInfoImpl()
+_AppWidgetSizeInfoImpl::~_AppWidgetSizeInfoImpl()
{
}
-LiveboxSizeInfo*
-_LiveboxSizeInfoImpl::CreateLiveboxSizeInfo(Tizen::Graphics::FloatDimension size, const Tizen::Base::String& previewImagePath)
+AppWidgetSizeInfo*
+_AppWidgetSizeInfoImpl::CreateAppWidgetSizeInfo(Tizen::Graphics::FloatDimension size, const Tizen::Base::String& previewImagePath)
{
- return new (std::nothrow) LiveboxSizeInfo(size, previewImagePath);
+ return new (std::nothrow) AppWidgetSizeInfo(size, previewImagePath);
}
FloatDimension
-_LiveboxSizeInfoImpl::GetSize() const
+_AppWidgetSizeInfoImpl::GetSize() const
{
return __size;
}
Tizen::Base::String
-_LiveboxSizeInfoImpl::GetPreviewImagePath() const
+_AppWidgetSizeInfoImpl::GetPreviewImagePath() const
{
return __previewImagePath;
}
// limitations under the License.
//
/**
- * @file FShell_LiveboxView.cpp
- * @brief This is the implementation file for the _LiveboxView class.
+ * @file FShell_AppWidgetView.cpp
+ * @brief This is the implementation file for the _AppWidgetView class.
*/
#include <new>
#include <livebox.h>
+#include <FBaseColLinkedListT.h>
#include <FBaseSysLog.h>
#include <FBaseString.h>
#include <FGrpBitmap.h>
#include <FGrp_BitmapImpl.h>
#include <FMedia_ImageDecoder.h>
#include "FUi_TouchFlickGestureDetector.h"
-#include "FShell_LiveboxView.h"
-#include "FShell_LiveboxViewPresenter.h"
-#include "FShell_LiveboxPopupView.h"
-#include "FShell_LiveboxViewManager.h"
+#include "FShell_IAppWidgetViewEventListener.h"
+#include "FShell_AppWidgetManagerImpl.h"
+#include "FShell_AppWidgetView.h"
+#include "FShell_AppWidgetViewPresenter.h"
+#include "FShell_AppWidgetPopupView.h"
+#include "FShell_AppWidgetViewManager.h"
#include "FUi_ResourceManager.h"
#include "FUiAnim_EflNode.h"
#include "FUiAnim_VisualElementImpl.h"
using namespace std;
using namespace Tizen::App;
using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
using namespace Tizen::Graphics;
using namespace Tizen::Ui;
using namespace Tizen::Ui::Controls;
const int ANIMATION_DURATION = 150;
-_LiveboxView::_LiveboxView(void)
- : __pLiveboxViewPresenter(new (std::nothrow) _LiveboxViewPresenter(*this))
- , __pLivebox(null)
- , __pLiveboxViewManager(null)
+_AppWidgetView::_AppWidgetView(void)
+ : __pAppWidgetViewPresenter(new (std::nothrow) _AppWidgetViewPresenter(*this))
+ , __pAppWidget(null)
+ , __pAppWidgetViewManager(null)
, __resizeFromRemote(false)
, __updated(false)
, __pixmap(-1)
+ , __pAppWidgetViewEventListenerList(new (std::nothrow) LinkedListT<_IAppWidgetViewEventListener*>)
{
- __pLiveboxViewManager = _LiveboxViewManager::GetInstance();
- SysTryReturnVoidResult(NID_UI_CTRL, __pLiveboxViewManager, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ __pAppWidgetViewManager = _AppWidgetViewManager::GetInstance();
+ SysTryReturnVoidResult(NID_UI_CTRL, __pAppWidgetViewManager, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
}
-_LiveboxView::~_LiveboxView(void)
+_AppWidgetView::~_AppWidgetView(void)
{
- __pLiveboxViewManager->RemoveLiveboxView(this);
+ __pAppWidgetViewManager->RemoveAppWidgetView(this);
- if (__pLiveboxPopupView)
+ if (__pAppWidgetPopupView)
{
- __pLiveboxPopupView->RemoveLiveboxPopupEventListener(*this);
+ __pAppWidgetPopupView->RemoveAppWidgetPopupEventListener(*this);
}
if (__pTouchFlickGestureDetector)
}
}
-_LiveboxView*
-_LiveboxView::CreateLiveboxViewN(void)
+_AppWidgetView*
+_AppWidgetView::CreateAppWidgetViewN(void)
{
- unique_ptr<_LiveboxView> pLiveboxView(new (std::nothrow) _LiveboxView());
- SysTryReturn(NID_UI_CTRL, pLiveboxView, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ unique_ptr<_AppWidgetView> pAppWidgetView(new (std::nothrow) _AppWidgetView());
+ SysTryReturn(NID_UI_CTRL, pAppWidgetView, 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));
- pLiveboxView->AcquireHandle();
+ pAppWidgetView->AcquireHandle();
SetLastResult(E_SUCCESS);
- return pLiveboxView.release();
+ return pAppWidgetView.release();
}
result
-_LiveboxView::Initialize(const AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::FloatRectangle& rect, const String& userInfo)
+_AppWidgetView::Initialize(const AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::FloatRectangle& rect, const String& userInfo)
{
SysLog(NID_UI_CTRL, "appId [%ls]", appId.GetPointer());
SysLog(NID_UI_CTRL, "providerName [%ls]", providerName.GetPointer());
result r = SetBounds(rect);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- r = __pLiveboxViewPresenter->Initialize(appId, providerName);
+ r = __pAppWidgetViewPresenter->Initialize(appId, providerName);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
int width = 0;
int height = 0;
- unique_ptr<ByteBuffer> pByteBuffer(_ImageDecoder::DecodeToBufferN(__pLiveboxViewPresenter->GetAppIconPath(), MEDIA_PIXEL_FORMAT_BGRA8888, width, height));
+ unique_ptr<ByteBuffer> pByteBuffer(_ImageDecoder::DecodeToBufferN(__pAppWidgetViewPresenter->GetAppIconPath(), MEDIA_PIXEL_FORMAT_BGRA8888, width, height));
unique_ptr<Bitmap> pBitmap(_BitmapImpl::GetNonScaledBitmapN(*pByteBuffer.get(), Dimension(width, height), BITMAP_PIXEL_FORMAT_ARGB8888));
__pAppIconBitmap = move(pBitmap);
__pTouchFlickGestureDetector = move(pTouchFlickGestureDetector);
- __pLivebox = __pLiveboxViewManager->AddLiveboxView(this, userInfo);
+ __pAppWidget = __pAppWidgetViewManager->AddAppWidgetView(this, userInfo);
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, __pLivebox, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, __pAppWidget, r, r, "[%s] Propagating.", GetErrorMessage(r));
Bitmap* pResourceBitmap = null;
return r;
}
-_LiveboxPopupView*
-_LiveboxView::GetLiveboxPopup(void) const
+AppWidgetProviderInfo*
+_AppWidgetView::GetAppWidgetProviderInfoN(void) const
{
- return __pLiveboxPopupView.get();
+ AppWidgetProviderInfo* pProviderInfo = _AppWidgetManagerImpl::GetInstance()->GetAppWidgetProviderInfoN(GetAppId(), GetProviderName());
+ result r = GetLastResult();
+ SysTryReturn(NID_UI_CTRL, pProviderInfo, null, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return pProviderInfo;
+}
+
+result
+_AppWidgetView::AddAppWidgetViewEventListener(_IAppWidgetViewEventListener& listener)
+{
+ bool exist = __pAppWidgetViewEventListenerList->Contains(&listener);
+ SysTryReturn(NID_UI_CTRL, exist == false, E_OBJ_ALREADY_EXIST, E_OBJ_ALREADY_EXIST, "[%s] Propagating.", GetErrorMessage(E_OBJ_ALREADY_EXIST));
+
+ __pAppWidgetViewEventListenerList->Add(&listener);
+
+ return E_SUCCESS;
+}
+
+result
+_AppWidgetView::RemoveAppWidgetViewEventListener(_IAppWidgetViewEventListener& listener)
+{
+ result r = __pAppWidgetViewEventListenerList->Remove(&listener);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] Propagating.", GetErrorMessage(E_OBJ_NOT_FOUND));
+
+ return E_SUCCESS;
+}
+
+_AppWidgetPopupView*
+_AppWidgetView::GetAppWidgetPopup(void) const
+{
+ return __pAppWidgetPopupView.get();
+}
+
+String
+_AppWidgetView::GetAppId(void) const
+{
+ return __pAppWidgetViewPresenter->GetAppId();
}
String
-_LiveboxView::GetAppId(void) const
+_AppWidgetView::GetAppWidgetId(void) const
{
- return __pLiveboxViewPresenter->GetAppId();
+ return __pAppWidgetViewPresenter->GetAppWidgetId();
}
String
-_LiveboxView::GetLiveboxId(void) const
+_AppWidgetView::GetProviderName(void) const
{
- return __pLiveboxViewPresenter->GetLiveboxId();
+ return __pAppWidgetViewPresenter->GetProviderName();
}
Bitmap*
-_LiveboxView::GetAppIconBitmap(void) const
+_AppWidgetView::GetAppIconBitmap(void) const
{
return __pAppIconBitmap.get();
}
Bitmap*
-_LiveboxView::GetBitmap(void) const
+_AppWidgetView::GetBitmap(void) const
{
return __pBitmap.get();
}
bool
-_LiveboxView::IsUpdated(void) const
+_AppWidgetView::IsUpdated(void) const
{
return __updated;
}
FloatDimension
-_LiveboxView::GetAnchorSize(void) const
+_AppWidgetView::GetAnchorSize(void) const
{
Bitmap* pArrowBitmap = null;
int lower = 0;
}
livebox*
-_LiveboxView::GetNativeLivebox(void) const
+_AppWidgetView::GetNativeAppWidget(void) const
{
- return __pLivebox;
+ return __pAppWidget;
}
result
-_LiveboxView::OpenLiveboxPopup(void)
+_AppWidgetView::OpenAppWidgetPopup(void)
{
result r = E_SUCCESS;
r = GetLastResult();
SysTryReturn(NID_UI_CTRL, pParent, r, r, "[%s] Propagating.", GetErrorMessage(r));
- FloatDimension size = __pLiveboxViewManager->GetLiveboxPopupSize(__pLivebox);
+ FloatDimension size = __pAppWidgetViewManager->GetAppWidgetPopupSize(__pAppWidget);
FloatRectangle popupBounds(0, 0, size.width, size.height);
FloatRectangle bounds = GetBoundsF();
FloatRectangle absoluteBounds = GetAbsoluteBoundsF();
SysLog(NID_UI_CTRL, "[%d %d]", popupBounds.y, size.height);
- if (!__pLiveboxPopupView)
+ if (!__pAppWidgetPopupView)
{
- unique_ptr<_LiveboxPopupView> pLiveboxPopupView(_LiveboxPopupView::CreateLiveboxPopupN(*this));
+ unique_ptr<_AppWidgetPopupView> pAppWidgetPopupView(_AppWidgetPopupView::CreateAppWidgetPopupN(*this));
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pLiveboxPopupView, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, pAppWidgetPopupView, r, r, "[%s] Propagating.", GetErrorMessage(r));
- r = pLiveboxPopupView->Initialize(popupBounds);
+ r = pAppWidgetPopupView->Initialize(popupBounds);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- r = pLiveboxPopupView->AddLiveboxPopupEventListener(*this);
+ r = pAppWidgetPopupView->AddAppWidgetPopupEventListener(*this);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- __pLiveboxPopupView = move(pLiveboxPopupView);
+ __pAppWidgetPopupView = move(pAppWidgetPopupView);
}
- __pLiveboxPopupView->SetOwner(this);
+ __pAppWidgetPopupView->SetOwner(this);
- r = __pLiveboxPopupView->Open();
+ r = __pAppWidgetPopupView->Open();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return r;
}
void
-_LiveboxView::GetTouchPostion(const FloatPoint& point, double& x, double& y) const
+_AppWidgetView::GetTouchPostion(const FloatPoint& point, double& x, double& y) const
{
FloatRectangle bounds = GetBoundsF();
}
void
-_LiveboxView::PlayClickAnimation(void)
+_AppWidgetView::PlayClickAnimation(void)
{
VisualElementPropertyAnimation animation;
animation.SetPropertyName(L"transform.scale.xy");
}
void
-_LiveboxView::PlayFlickAnimation(void)
+_AppWidgetView::PlayFlickAnimation(void)
{
const int DISTANCE = 30;
}
void
-_LiveboxView::GetRemainingSpace(int& lower, int& upper) const
+_AppWidgetView::GetRemainingSpace(int& lower, int& upper) const
{
const _Control* pParent = GetParent();
result r = GetLastResult();
}
result
-_LiveboxView::OnAttachedToMainTree(void)
+_AppWidgetView::OnAttachedToMainTree(void)
{
result r = E_SUCCESS;
}
result
-_LiveboxView::OnDetachingFromMainTree(void)
+_AppWidgetView::OnDetachingFromMainTree(void)
{
result r = E_SUCCESS;
}
bool
-_LiveboxView::OnFlickGestureDetected(_TouchFlickGestureDetector& gesture)
+_AppWidgetView::OnFlickGestureDetected(_TouchFlickGestureDetector& gesture)
{
_FlickDirection direction = gesture.GetDirection();
if (direction == _FLICK_DIRECTION_DOWN)
{
PlayFlickAnimation();
- OpenLiveboxPopup();
+ OpenAppWidgetPopup();
}
return false;
}
bool
-_LiveboxView::OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture)
+_AppWidgetView::OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture)
{
return false;
}
void
-_LiveboxView::OnBoundsChanged(void)
+_AppWidgetView::OnBoundsChanged(void)
{
FloatDimension size(GetSizeF());
if (!__resizeFromRemote)
{
- __pLiveboxViewManager->SetLiveboxSize(*this, size);
+ __pAppWidgetViewManager->SetAppWidgetSize(*this, size);
__updated = false;
}
}
bool
-_LiveboxView::OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo)
+_AppWidgetView::OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo)
{
- int type = livebox_lb_type(__pLivebox);
+ int type = livebox_lb_type(__pAppWidget);
if ((type == LB_TYPE_BUFFER) || (type == LB_TYPE_PIXMAP))
{
double x = 0.0;
Point position = _CoordinateSystemUtils::ConvertToInteger(touchInfo.GetCurrentPosition());
GetTouchPostion(FloatPoint(static_cast<float>(position.x), static_cast<float>(position.y)), x, y);
- livebox_content_event(__pLivebox, LB_MOUSE_DOWN, x, y);
+ livebox_content_event(__pAppWidget, LB_MOUSE_DOWN, x, y);
}
return false;
}
bool
-_LiveboxView::OnTouchReleased(const _Control& source, const _TouchInfo& touchInfo)
+_AppWidgetView::OnTouchReleased(const _Control& source, const _TouchInfo& touchInfo)
{
FloatRectangle clientBounds(GetClientBoundsF());
Point position(_CoordinateSystemUtils::ConvertToInteger(touchInfo.GetCurrentPosition()));
double y = 0.0;
GetTouchPostion(floatPosition, x, y);
- int type = livebox_lb_type(__pLivebox);
+ int type = livebox_lb_type(__pAppWidget);
if ((type == LB_TYPE_BUFFER) || (type == LB_TYPE_PIXMAP))
{
- livebox_content_event(__pLivebox, LB_MOUSE_UP, x, y);
+ livebox_content_event(__pAppWidget, LB_MOUSE_UP, x, y);
}
- livebox_click(__pLivebox, x, y);
+ livebox_click(__pAppWidget, x, y);
return false;
}
bool
-_LiveboxView::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo)
+_AppWidgetView::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo)
{
- int type = livebox_lb_type(__pLivebox);
+ int type = livebox_lb_type(__pAppWidget);
if ((type == LB_TYPE_BUFFER) || (type == LB_TYPE_PIXMAP))
{
double x = 0.0;
Point position = _CoordinateSystemUtils::ConvertToInteger(touchInfo.GetCurrentPosition());
GetTouchPostion(FloatPoint(static_cast<float>(position.x), static_cast<float>(position.y)), x, y);
- livebox_content_event(__pLivebox, LB_MOUSE_MOVE, x, y);
+ livebox_content_event(__pAppWidget, LB_MOUSE_MOVE, x, y);
}
return false;
}
void
-_LiveboxView::OnLiveboxPopupViewOpened(void)
+_AppWidgetView::OnAppWidgetPopupViewOpened(void)
{
}
void
-_LiveboxView::OnLiveboxPopupViewClosed(void)
+_AppWidgetView::OnAppWidgetPopupViewClosed(void)
{
- __pLiveboxPopupView.reset(null);
+ __pAppWidgetPopupView.reset(null);
}
void
-_LiveboxView::OnDraw(void)
+_AppWidgetView::OnDraw(void)
{
- __pLiveboxViewPresenter->Draw();
+ __pAppWidgetViewPresenter->Draw();
}
void
-_LiveboxView::OnLiveboxUpdated(const Bitmap& bitmap, const FloatDimension& size)
+_AppWidgetView::OnAppWidgetUpdated(const Bitmap& bitmap, const FloatDimension& size)
{
__resizeFromRemote = true;
SetSize(size);
}
void
-_LiveboxView::OnLiveboxUpdated(int pixmap)
+_AppWidgetView::OnAppWidgetUpdated(int pixmap)
{
int x = 0;
int y = 0;
}
Eina_Bool
-_LiveboxView::OnPixmapDamaged(void* pData, int type, void* pEvent)
+_AppWidgetView::OnPixmapDamaged(void* pData, int type, void* pEvent)
{
- _LiveboxView* pLiveboxView = static_cast<_LiveboxView*>(pData);
- SysTryReturn(NID_UI_CTRL, pLiveboxView != null, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[[E_INVALID_ARG] The argument is invalid.");
+ _AppWidgetView* pAppWidgetView = static_cast<_AppWidgetView*>(pData);
+ SysTryReturn(NID_UI_CTRL, pAppWidgetView != null, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[[E_INVALID_ARG] The argument is invalid.");
Ecore_X_Event_Damage* pDamageEvent = static_cast<Ecore_X_Event_Damage*>(pEvent);
SysTryReturn(NID_UI_CTRL, pDamageEvent != null, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- int pixmap = pLiveboxView->__pixmap;
+ int pixmap = pAppWidgetView->__pixmap;
SysTryReturn(NID_UI_CTRL, pDamageEvent->drawable == pixmap, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid [%d %d].", pDamageEvent->drawable, pixmap);
int x = 0;
ecore_x_pixmap_geometry_get(pixmap, &x, &y, &width, &height);
SysTryReturn(NID_UI_CTRL, (width > 0) && (height > 0), ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid [0x%x %d %d].", pixmap, width , height);
- Evas_Object* pPixmapObject = pLiveboxView->__pPixmapObject.get();
+ Evas_Object* pPixmapObject = pAppWidgetView->__pPixmapObject.get();
SysTryReturn(NID_UI_CTRL, pPixmapObject, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
evas_object_image_pixels_dirty_set(pPixmapObject, EINA_TRUE);
// limitations under the License.
//
/**
- * @file FShell_LiveboxView.h
- * @brief This is the header file for the _LiveboxView class.
+ * @file FShell_AppWidgetView.h
+ * @brief This is the header file for the _AppWidgetView class.
*
- * This header file contains the declarations of the %_LiveboxView class.
+ * This header file contains the declarations of the %_AppWidgetView class.
*/
-#ifndef _FSHELL_INTERNAL_LIVEBOX_VIEW_H_
-#define _FSHELL_INTERNAL_LIVEBOX_VIEW_H_
+#ifndef _FSHELL_INTERNAL_APPWIDGET_VIEW_H_
+#define _FSHELL_INTERNAL_APPWIDGET_VIEW_H_
#include <unique_ptr.h>
#include <Evas.h>
#include <Ecore.h>
#include <Ecore_X.h>
#include <FAppTypes.h>
+#include <FBaseColIListT.h>
#include "FUi_Control.h"
#include "FUi_ITouchFlickGestureEventListener.h"
#include "FUiAnim_VisualElement.h"
-#include "FShell_ILiveboxPopupViewEventListener.h"
+#include "FShell_IAppWidgetPopupViewEventListener.h"
namespace Tizen { namespace Base
{
namespace Tizen { namespace Shell
{
-
-class _LiveboxViewPresenter;
-class _LiveboxPopupView;
+class AppWidgetProviderInfo;
+class _IAppWidgetViewEventListener;
+class _AppWidgetViewPresenter;
+class _AppWidgetPopupView;
/**
- * @class _LiveboxView
+ * @class _AppWidgetView
* @brief
* @since 2.1
*/
-class _LiveboxView
+class _AppWidgetView
: public Tizen::Ui::_Control
, public Tizen::Ui::_ITouchFlickGestureEventListener
- , public _ILiveboxPopupViewEventListener
+ , public _IAppWidgetPopupViewEventListener
{
public:
- static _LiveboxView* CreateLiveboxViewN(void);
- virtual ~_LiveboxView(void);
+ static _AppWidgetView* CreateAppWidgetViewN(void);
+ virtual ~_AppWidgetView(void);
result Initialize(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::FloatRectangle& rect, const Tizen::Base::String& userInfo);
- _LiveboxPopupView* GetLiveboxPopup(void) const;
+ AppWidgetProviderInfo* GetAppWidgetProviderInfoN(void) const;
+ result AddAppWidgetViewEventListener(_IAppWidgetViewEventListener& listener);
+ result RemoveAppWidgetViewEventListener(_IAppWidgetViewEventListener& listener);
+ _AppWidgetPopupView* GetAppWidgetPopup(void) const;
Tizen::Base::String GetAppId(void) const;
- Tizen::Base::String GetLiveboxId(void) const;
+ Tizen::Base::String GetAppWidgetId(void) const;
+ Tizen::Base::String GetProviderName(void) const;
Tizen::Graphics::Bitmap* GetAppIconBitmap(void) const;
Tizen::Graphics::Bitmap* GetBitmap(void) const;
bool IsUpdated(void) const;
Tizen::Graphics::FloatDimension GetAnchorSize(void) const;
protected:
- _LiveboxView(void);
+ _AppWidgetView(void);
private:
- _LiveboxView(const _LiveboxView& rhs);
- _LiveboxView& operator =(const _LiveboxView& rhs);
+ _AppWidgetView(const _AppWidgetView& rhs);
+ _AppWidgetView& operator =(const _AppWidgetView& rhs);
- struct livebox* GetNativeLivebox(void) const;
- result OpenLiveboxPopup(void);
+ struct livebox* GetNativeAppWidget(void) const;
+ result OpenAppWidgetPopup(void);
void GetTouchPostion(const Tizen::Graphics::FloatPoint& point, double& x, double& y) const;
void PlayClickAnimation(void);
void PlayFlickAnimation(void);
virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchInfo);
virtual bool OnTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchInfo);
virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchInfo);
- virtual void OnLiveboxPopupViewOpened(void);
- virtual void OnLiveboxPopupViewClosed(void);
+ virtual void OnAppWidgetPopupViewOpened(void);
+ virtual void OnAppWidgetPopupViewClosed(void);
virtual void OnDraw(void);
- void OnLiveboxUpdated(const Tizen::Graphics::Bitmap& bitmap, const Tizen::Graphics::FloatDimension& size);
- void OnLiveboxUpdated(int pixmap);
+ void OnAppWidgetUpdated(const Tizen::Graphics::Bitmap& bitmap, const Tizen::Graphics::FloatDimension& size);
+ void OnAppWidgetUpdated(int pixmap);
static Eina_Bool OnPixmapDamaged(void* pData, int type, void* pEvent);
private:
- std::unique_ptr<_LiveboxViewPresenter> __pLiveboxViewPresenter;
+ std::unique_ptr<_AppWidgetViewPresenter> __pAppWidgetViewPresenter;
std::unique_ptr<Tizen::Graphics::Bitmap> __pBitmap;
std::unique_ptr<Tizen::Graphics::Bitmap> __pAppIconBitmap;
std::unique_ptr<Tizen::Graphics::Bitmap> __pArrowUpBitmap;
std::unique_ptr<Tizen::Graphics::Bitmap> __pArrowDownBitmap;
- struct livebox* __pLivebox;
- friend class _LiveboxViewManager;
- class _LiveboxViewManager* __pLiveboxViewManager;
- friend class _LiveboxPopupView;
- std::unique_ptr<_LiveboxPopupView> __pLiveboxPopupView;
+ struct livebox* __pAppWidget;
+ friend class _AppWidgetViewManager;
+ class _AppWidgetViewManager* __pAppWidgetViewManager;
+ friend class _AppWidgetPopupView;
+ std::unique_ptr<_AppWidgetPopupView> __pAppWidgetPopupView;
std::unique_ptr<Tizen::Ui::_TouchFlickGestureDetector> __pTouchFlickGestureDetector;
bool __resizeFromRemote;
bool __updated;
}
};
std::unique_ptr<Ecore_Event_Handler, _EcoreEventHandlerDeleter> __pPixmapEventHandler;
-}; // _LiveboxView
+ std::unique_ptr<Tizen::Base::Collection::IListT<_IAppWidgetViewEventListener*> > __pAppWidgetViewEventListenerList;
+}; // _AppWidgetView
}} // Tizen::Shell
-#endif // _FSHELL_INTERNAL_LIVEBOX_VIEW_H_
+#endif // _FSHELL_INTERNAL_APPWIDGET_VIEW_H_
--- /dev/null
+//
+// 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.
+//
+
+#include <new>
+#include <unique_ptr.h>
+#include <FBaseColIEnumeratorT.h>
+#include <FBaseColLinkedListT.h>
+#include <FBaseSysLog.h>
+#include <FBaseString.h>
+#include <FGrpPoint.h>
+#include <FShellIAppWidgetViewEventListener.h>
+#include "FShell_AppWidgetViewImpl.h"
+
+using namespace std;
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+
+namespace Tizen { namespace Shell
+{
+
+const _AppWidgetViewImpl*
+_AppWidgetViewImpl::GetInstance(const AppWidgetView& appWidgetView)
+{
+ return static_cast<const _AppWidgetViewImpl*>(_ControlImpl::GetInstance(appWidgetView));
+}
+
+_AppWidgetViewImpl*
+_AppWidgetViewImpl::GetInstance(AppWidgetView& appWidgetView)
+{
+ return static_cast<_AppWidgetViewImpl*>(_ControlImpl::GetInstance(appWidgetView));
+}
+
+_AppWidgetViewImpl*
+_AppWidgetViewImpl::CreateAppWidgetViewImplN(AppWidgetView& appWidgetView)
+{
+ unique_ptr<_AppWidgetView> pCore(_AppWidgetView::CreateAppWidgetViewN());
+ result r = GetLastResult();
+ SysTryReturn(NID_UI_CTRL, pCore, null, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ unique_ptr<_AppWidgetViewImpl> pImpl(new (std::nothrow) _AppWidgetViewImpl(&appWidgetView, pCore.get()));
+ SysTryReturn(NID_UI_CTRL, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+
+ pCore.release();
+
+ r = GetLastResult();
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return pImpl.release();
+}
+
+_AppWidgetViewImpl::_AppWidgetViewImpl(AppWidgetView* pPublic, _AppWidgetView* pCore)
+ : _ContainerImpl(pPublic, pCore)
+ , __pAppWidgetViewEventListenerList(new (std::nothrow) LinkedListT<IAppWidgetViewEventListener*>)
+{
+}
+
+_AppWidgetViewImpl::~_AppWidgetViewImpl(void)
+{
+ GetCore().RemoveAppWidgetViewEventListener(*this);
+}
+
+const char*
+_AppWidgetViewImpl::GetPublicClassName(void) const
+{
+ return "Tizen::Shell::AppWidgetView";
+}
+
+const AppWidgetView&
+_AppWidgetViewImpl::GetPublic(void) const
+{
+ return static_cast<const AppWidgetView&>(_ControlImpl::GetPublic());
+}
+
+AppWidgetView&
+_AppWidgetViewImpl::GetPublic(void)
+{
+ return static_cast<AppWidgetView&>(_ControlImpl::GetPublic());
+}
+
+const _AppWidgetView&
+_AppWidgetViewImpl::GetCore(void) const
+{
+ return static_cast<const _AppWidgetView&>(_ControlImpl::GetCore());
+}
+
+_AppWidgetView&
+_AppWidgetViewImpl::GetCore(void)
+{
+ return static_cast<_AppWidgetView&>(_ControlImpl::GetCore());
+}
+
+void
+_AppWidgetViewImpl::OnAppWidgetProviderRemoved(_AppWidgetView& appwidgetView)
+{
+ unique_ptr<IEnumeratorT<IAppWidgetViewEventListener*> > pEnumerator(__pAppWidgetViewEventListenerList->GetEnumeratorN());
+ if (pEnumerator)
+ {
+ while (pEnumerator->MoveNext() == E_SUCCESS)
+ {
+ IAppWidgetViewEventListener* pListener = null;
+ pEnumerator->GetCurrent(pListener);
+
+ if (pListener)
+ {
+ pListener->OnAppWidgetProviderRemoved(GetPublic());
+ }
+ }
+ }
+}
+
+result
+_AppWidgetViewImpl::Initialize(const AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::FloatRectangle& rect, const String& userInfo)
+{
+ result r = GetCore().Initialize(appId, providerName, rect, userInfo);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ r = GetCore().AddAppWidgetViewEventListener(*this);
+
+ return r;
+}
+
+AppWidgetProviderInfo*
+_AppWidgetViewImpl::GetAppWidgetProviderInfoN(void) const
+{
+ AppWidgetProviderInfo* pProviderInfo = GetCore().GetAppWidgetProviderInfoN();
+ result r = GetLastResult();
+ SysTryReturn(NID_UI_CTRL, pProviderInfo, null, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return pProviderInfo;
+}
+
+result
+_AppWidgetViewImpl::AddAppWidgetViewEventListener(IAppWidgetViewEventListener& listener)
+{
+ bool exist = __pAppWidgetViewEventListenerList->Contains(&listener);
+ SysTryReturn(NID_UI_CTRL, exist, E_OBJ_ALREADY_EXIST, E_OBJ_ALREADY_EXIST, "[%s] Propagating.", GetErrorMessage(E_OBJ_ALREADY_EXIST));
+
+ __pAppWidgetViewEventListenerList->Add(&listener);
+
+ return E_SUCCESS;
+}
+
+result
+_AppWidgetViewImpl::RemoveAppWidgetViewEventListener(IAppWidgetViewEventListener& listener)
+{
+ result r = __pAppWidgetViewEventListenerList->Remove(&listener);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] Propagating.", GetErrorMessage(E_OBJ_NOT_FOUND));
+
+ return E_SUCCESS;
+}
+
+}} // Tizen::Shell
--- /dev/null
+//
+// 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.
+//
+#ifndef _FSHELL_INTERNAL_APPWIDGET_VIEW_IMPL_H_
+#define _FSHELL_INTERNAL_APPWIDGET_VIEW_IMPL_H_
+
+#include <unique_ptr.h>
+#include <FAppTypes.h>
+#include <FShellAppWidgetView.h>
+#include "FUi_ContainerImpl.h"
+#include "FShell_IAppWidgetViewEventListener.h"
+#include "FShell_AppWidgetView.h"
+
+namespace Tizen { namespace Base
+{
+class String;
+}}
+
+namespace Tizen { namespace Graphics
+{
+class Point;
+class FloatRectangle;
+}}
+
+namespace Tizen { namespace Shell
+{
+
+class _AppWidgetViewImpl
+ : public Tizen::Ui::_ContainerImpl
+ , public _IAppWidgetViewEventListener
+{
+public:
+ static _AppWidgetViewImpl* CreateAppWidgetViewImplN(AppWidgetView& appWidgetView);
+ static const _AppWidgetViewImpl* GetInstance(const AppWidgetView& appWidgetView);
+ static _AppWidgetViewImpl* GetInstance(AppWidgetView& appWidgetView);
+
+ virtual ~_AppWidgetViewImpl(void);
+
+ virtual const char* GetPublicClassName(void) const;
+ virtual const AppWidgetView& GetPublic(void) const;
+ virtual AppWidgetView& GetPublic(void);
+ virtual const _AppWidgetView& GetCore(void) const;
+ virtual _AppWidgetView& GetCore(void);
+
+ result Initialize(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::FloatRectangle& rect, const Tizen::Base::String& userInfo);
+ AppWidgetProviderInfo* GetAppWidgetProviderInfoN(void) const;
+ result AddAppWidgetViewEventListener(IAppWidgetViewEventListener& listener);
+ result RemoveAppWidgetViewEventListener(IAppWidgetViewEventListener& listener);
+
+protected:
+ _AppWidgetViewImpl(AppWidgetView* pPublic, _AppWidgetView* pCore);
+
+private:
+ _AppWidgetViewImpl(const _AppWidgetViewImpl& rhs);
+ _AppWidgetViewImpl& operator =(const _AppWidgetViewImpl& rhs);
+
+ virtual void OnAppWidgetProviderRemoved(_AppWidgetView& appwidgetView);
+
+private:
+ std::unique_ptr<Tizen::Base::Collection::IListT<IAppWidgetViewEventListener*> > __pAppWidgetViewEventListenerList;
+}; // _AppWidgetViewImpl
+
+}} // Tizen::Shell
+
+#endif // _FSHELL_INTERNAL_APPWIDGET_VIEW_IMPL_H_
// limitations under the License.
//
/**
- * @file FShell_LiveboxViewManager.cpp
- * @brief This is the implementation file for the _LiveboxView class.
+ * @file FShell_AppWidgetViewManager.cpp
+ * @brief This is the implementation file for the _AppWidgetView class.
*/
#include <new>
#include <FGrp_BitmapImpl.h>
#include <FGrp_CoordinateSystem.h>
#include <FMedia_ImageDecoder.h>
-#include "FShell_LiveboxViewManager.h"
-#include "FShell_LiveboxView.h"
-#include "FShell_LiveboxPopupView.h"
+#include "FShell_AppWidgetViewManager.h"
+#include "FShell_AppWidgetView.h"
+#include "FShell_AppWidgetPopupView.h"
//#define _PIXMAP_TEST
const int LIVEBOX_SIZE_2 = 354;
const int LIVEBOX_SIZE_4 = 712;
-struct _LiveboxSizeInfo
+struct _AppWidgetSizeInfo
{
int type;
int width;
int height;
};
-const _LiveboxSizeInfo LIVEBOX_SIZE_INFO[] =
+const _AppWidgetSizeInfo LIVEBOX_SIZE_INFO[] =
{
{ LB_SIZE_TYPE_1x1, LIVEBOX_SIZE_1, LIVEBOX_SIZE_1 },
{ LB_SIZE_TYPE_2x1, LIVEBOX_SIZE_2, LIVEBOX_SIZE_1 },
};
-_LiveboxViewManager*
-_LiveboxViewManager::GetInstance(void)
+_AppWidgetViewManager*
+_AppWidgetViewManager::GetInstance(void)
{
- static _LiveboxViewManager instance;
+ static _AppWidgetViewManager instance;
return &instance;
}
livebox*
-_LiveboxViewManager::AddLiveboxView(_LiveboxView* pLiveboxView, const String& userInfo)
+_AppWidgetViewManager::AddAppWidgetView(_AppWidgetView* pAppWidgetView, const String& userInfo)
{
- SysTryReturn(NID_UI_CTRL, pLiveboxView, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ SysTryReturn(NID_UI_CTRL, pAppWidgetView, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- unique_ptr<char[]> pLiveboxId(_StringConverter::CopyToCharArrayN(pLiveboxView->GetLiveboxId()));
- SysTryReturn(NID_UI_CTRL, pLiveboxId, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ unique_ptr<char[]> pAppWidgetId(_StringConverter::CopyToCharArrayN(pAppWidgetView->GetAppWidgetId()));
+ SysTryReturn(NID_UI_CTRL, pAppWidgetId, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
unique_ptr<char[]> pContent(_StringConverter::CopyToCharArrayN(userInfo));
SysTryReturn(NID_UI_CTRL, pContent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
const char* pCluster = "user,created";
const char* pCategory = "default";
double period = 1.0f;
- int sizeType = GetLiveboxSizeType(pLiveboxView->GetSizeF());
+ int sizeType = GetAppWidgetSizeType(pAppWidgetView->GetSizeF());
- livebox* pLivebox = livebox_add_with_size(pLiveboxId.get(), pContent.get(), pCluster, pCategory, period, sizeType, OnLiveboxAdded, this);
- SysTryReturn(NID_UI_CTRL, pLivebox, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ livebox* pAppWidget = livebox_add_with_size(pAppWidgetId.get(), pContent.get(), pCluster, pCategory, period, sizeType, OnAppWidgetAdded, this);
+ SysTryReturn(NID_UI_CTRL, pAppWidget, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
- __pViewMap->Add(pLivebox, pLiveboxView);
+ __pViewMap->Add(pAppWidget, pAppWidgetView);
- return pLivebox;
+ return pAppWidget;
}
void
-_LiveboxViewManager::RemoveLiveboxView(_LiveboxView* pLiveboxView)
+_AppWidgetViewManager::RemoveAppWidgetView(_AppWidgetView* pAppWidgetView)
{
- SysTryReturnVoidResult(NID_UI_CTRL, pLiveboxView, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidgetView, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- livebox* pLivebox = pLiveboxView->GetNativeLivebox();
- SysTryReturnVoidResult(NID_UI_CTRL, pLivebox, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ livebox* pAppWidget = pAppWidgetView->GetNativeAppWidget();
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidget, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- __pViewMap->Remove(pLivebox);
+ __pViewMap->Remove(pAppWidget);
- livebox_del(pLivebox, OnLiveboxDeleted, this);
+ livebox_del(pAppWidget, OnAppWidgetDeleted, this);
- __pViewMap->Remove(pLivebox);
+ __pViewMap->Remove(pAppWidget);
}
-_LiveboxView*
-_LiveboxViewManager::GetLiveboxView(livebox* pLivebox) const
+_AppWidgetView*
+_AppWidgetViewManager::GetAppWidgetView(livebox* pAppWidget) const
{
- _LiveboxView* pLiveboxView = null;
- __pViewMap->GetValue(pLivebox, pLiveboxView);
+ _AppWidgetView* pAppWidgetView = null;
+ __pViewMap->GetValue(pAppWidget, pAppWidgetView);
- return pLiveboxView;
+ return pAppWidgetView;
}
FloatDimension
-_LiveboxViewManager::GetLiveboxSize(livebox* pLivebox) const
+_AppWidgetViewManager::GetAppWidgetSize(livebox* pAppWidget) const
{
- SysTryReturn(NID_UI_CTRL, pLivebox, FloatDimension(0, 0), E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ SysTryReturn(NID_UI_CTRL, pAppWidget, FloatDimension(0, 0), E_SYSTEM, "[E_SYSTEM] A system error occurred.");
int width = 0;
int height = 0;
- int type = livebox_size(pLivebox);
+ int type = livebox_size(pAppWidget);
livebox_service_get_size(type, &width, &height);
// SysLog(NID_UI_CTRL, "size [%d %d]", width, height);
}
FloatDimension
-_LiveboxViewManager::GetLiveboxPopupSize(livebox* pLivebox) const
+_AppWidgetViewManager::GetAppWidgetPopupSize(livebox* pAppWidget) const
{
- SysTryReturn(NID_UI_CTRL, pLivebox, FloatDimension(0, 0), E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ SysTryReturn(NID_UI_CTRL, pAppWidget, FloatDimension(0, 0), E_SYSTEM, "[E_SYSTEM] A system error occurred.");
int width = 0;
int height = 0;
- livebox_get_pdsize(pLivebox, &width, &height);
+ livebox_get_pdsize(pAppWidget, &width, &height);
// SysLog(NID_UI_CTRL, "size [%d %d]", width, height);
}
void
-_LiveboxViewManager::SetLiveboxSize(const _LiveboxView& liveboxView, const FloatDimension& size)
+_AppWidgetViewManager::SetAppWidgetSize(const _AppWidgetView& appwidgetView, const FloatDimension& size)
{
- livebox* pLivebox = liveboxView.GetNativeLivebox();
- SysTryReturnVoidResult(NID_UI_CTRL, pLivebox, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ livebox* pAppWidget = appwidgetView.GetNativeAppWidget();
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidget, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- int sizeType = GetLiveboxSizeType(size);
+ int sizeType = GetAppWidgetSizeType(size);
- livebox_resize(pLivebox, sizeType, OnLiveboxResized, this);
+ livebox_resize(pAppWidget, sizeType, OnAppWidgetResized, this);
}
-_LiveboxViewManager::_LiveboxViewManager(void)
+_AppWidgetViewManager::_AppWidgetViewManager(void)
: __glMode(false)
{
// _LogicalResolution sourceResolution = RESOLUTION_LOGICAL_720;
livebox_init(ecore_x_display_get());
livebox_subscribe_group("*", "*");
- __eventHandler.reset(livebox_set_event_handler(OnLiveboxEventReceived, this));
+ __eventHandler.reset(livebox_set_event_handler(OnAppWidgetEventReceived, this));
SysTryReturnVoidResult(NID_UI_CTRL, __eventHandler == 0, E_SYSTEM, "[E_SYSTEM] A system error occured.");
- __faultEventHandler.reset(livebox_set_fault_handler(OnLiveboxFaultReceived, this));
+ __faultEventHandler.reset(livebox_set_fault_handler(OnAppWidgetFaultReceived, this));
SysTryReturnVoidResult(NID_UI_CTRL, __faultEventHandler == 0, E_SYSTEM, "[E_SYSTEM] A system error occured.");
- unique_ptr<HashMapT<livebox*, _LiveboxView*> > pViewMap(new (std::nothrow) HashMapT<livebox*, _LiveboxView*>);
+ unique_ptr<HashMapT<livebox*, _AppWidgetView*> > pViewMap(new (std::nothrow) HashMapT<livebox*, _AppWidgetView*>);
SysTryReturnVoidResult(NID_UI_CTRL, pViewMap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
result r = pViewMap->Construct();
// SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
-_LiveboxViewManager::~_LiveboxViewManager(void)
+_AppWidgetViewManager::~_AppWidgetViewManager(void)
{
}
int
-_LiveboxViewManager::GetLiveboxSizeType(const Tizen::Graphics::FloatDimension& size) const
+_AppWidgetViewManager::GetAppWidgetSizeType(const Tizen::Graphics::FloatDimension& size) const
{
int sizeType = LB_SIZE_TYPE_UNKNOWN;
- int sizetypeCount = sizeof(LIVEBOX_SIZE_INFO) / sizeof(_LiveboxSizeInfo);
+ int sizetypeCount = sizeof(LIVEBOX_SIZE_INFO) / sizeof(_AppWidgetSizeInfo);
for ( int i = 0; i < sizetypeCount; ++ i)
{
if (size.width <= LIVEBOX_SIZE_INFO[i].width && size.height <= LIVEBOX_SIZE_INFO[i].height)
}
MediaPixelFormat
-_LiveboxViewManager::GetPixelFormat(BitmapPixelFormat format) const
+_AppWidgetViewManager::GetPixelFormat(BitmapPixelFormat format) const
{
MediaPixelFormat mediaPixelFormat = MEDIA_PIXEL_FORMAT_NONE;
}
Bitmap*
-_LiveboxViewManager::GetBitmapN(const String& fileName) const
+_AppWidgetViewManager::GetBitmapN(const String& fileName) const
{
int width = 0;
int height = 0;
}
Bitmap*
-_LiveboxViewManager::GetBitmapN(void* pBuffer, const FloatDimension& size) const
+_AppWidgetViewManager::GetBitmapN(void* pBuffer, const FloatDimension& size) const
{
SysTryReturn(NID_UI_CTRL, pBuffer, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
}
bool
-_LiveboxViewManager::IsGlMode(void) const
+_AppWidgetViewManager::IsGlMode(void) const
{
int mode = 0;
bool glMode = false;
}
void
-_LiveboxViewManager::OnLiveboxCreated(livebox* pLivebox)
+_AppWidgetViewManager::OnAppWidgetCreated(livebox* pAppWidget)
{
}
void
-_LiveboxViewManager::OnLiveboxUpdated(livebox* pLivebox)
+_AppWidgetViewManager::OnAppWidgetUpdated(livebox* pAppWidget)
{
- _LiveboxView* pLiveboxView = GetLiveboxView(pLivebox);
- SysTryReturnVoidResult(NID_UI_CTRL, pLiveboxView, E_SYSTEM, "[E_SYSTEM] A system error occured.");
+ _AppWidgetView* pAppWidgetView = GetAppWidgetView(pAppWidget);
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidgetView, E_SYSTEM, "[E_SYSTEM] A system error occured.");
- int type = livebox_lb_type(pLivebox);
+ int type = livebox_lb_type(pAppWidget);
// SysLog(NID_UI_CTRL, "type (%d)", type);
{
case LB_TYPE_IMAGE:
{
- unique_ptr<Bitmap> pBitmap(GetBitmapN(livebox_filename(pLivebox)));
+ unique_ptr<Bitmap> pBitmap(GetBitmapN(livebox_filename(pAppWidget)));
SysTryReturnVoidResult(NID_UI_CTRL, pBitmap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
- pLiveboxView->OnLiveboxUpdated(*pBitmap.get(), GetLiveboxSize(pLivebox));
+ pAppWidgetView->OnAppWidgetUpdated(*pBitmap.get(), GetAppWidgetSize(pAppWidget));
pBitmap.release();
}
break;
case LB_TYPE_BUFFER:
{
- void* pBuffer = livebox_acquire_fb(pLivebox);
+ void* pBuffer = livebox_acquire_fb(pAppWidget);
SysTryReturnVoidResult(NID_UI_CTRL, pBuffer, E_SYSTEM, "[E_SYSTEM] A system error occured.");
- FloatDimension sourceSize = GetLiveboxSize(pLivebox);
+ FloatDimension sourceSize = GetAppWidgetSize(pAppWidget);
SysLog(NID_UI_CTRL, "size [%d %d]", sourceSize.width, sourceSize.height);
unique_ptr<Bitmap> pBitmap(GetBitmapN(pBuffer, sourceSize));
SysTryReturnVoidResult(NID_UI_CTRL, pBitmap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
- pLiveboxView->OnLiveboxUpdated(*pBitmap.get(), sourceSize);
+ pAppWidgetView->OnAppWidgetUpdated(*pBitmap.get(), sourceSize);
livebox_release_fb(pBuffer);
pBitmap.release();
}
case LB_TYPE_PIXMAP:
if (__glMode)
{
- pLiveboxView->OnLiveboxUpdated(livebox_lb_pixmap(pLivebox));
+ pAppWidgetView->OnAppWidgetUpdated(livebox_lb_pixmap(pAppWidget));
#if defined(_PIXMAP_TEST)
- DumpPixmap(livebox_lb_pixmap(pLivebox));
+ DumpPixmap(livebox_lb_pixmap(pAppWidget));
#endif // _PIXMAP_TEST
}
else
{
- void* pBuffer = livebox_acquire_fb(pLivebox);
+ void* pBuffer = livebox_acquire_fb(pAppWidget);
SysTryReturnVoidResult(NID_UI_CTRL, pBuffer, E_SYSTEM, "[E_SYSTEM] A system error occured.");
- FloatDimension sourceSize = GetLiveboxSize(pLivebox);
+ FloatDimension sourceSize = GetAppWidgetSize(pAppWidget);
unique_ptr<Bitmap> pBitmap(GetBitmapN(pBuffer, sourceSize));
SysTryReturnVoidResult(NID_UI_CTRL, pBitmap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
- pLiveboxView->OnLiveboxUpdated(*pBitmap.get(), sourceSize);
+ pAppWidgetView->OnAppWidgetUpdated(*pBitmap.get(), sourceSize);
livebox_release_fb(pBuffer);
pBitmap.release();
}
}
void
-_LiveboxViewManager::OnLiveboxDeleted(livebox* pLivebox)
+_AppWidgetViewManager::OnAppWidgetDeleted(livebox* pAppWidget)
{
}
void
-_LiveboxViewManager::OnLiveboxPinUpChanged(livebox* pLivebox)
+_AppWidgetViewManager::OnAppWidgetPinUpChanged(livebox* pAppWidget)
{
}
void
-_LiveboxViewManager::OnLiveboxPopupUpdated(livebox* pLivebox)
+_AppWidgetViewManager::OnAppWidgetPopupUpdated(livebox* pAppWidget)
{
- _LiveboxView* pLiveboxView = GetLiveboxView(pLivebox);
- SysTryReturnVoidResult(NID_UI_CTRL, pLiveboxView, E_SYSTEM, "[E_SYSTEM] A system error occured.");
+ _AppWidgetView* pAppWidgetView = GetAppWidgetView(pAppWidget);
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidgetView, E_SYSTEM, "[E_SYSTEM] A system error occured.");
- _LiveboxPopupView* pLiveboxPopupView = pLiveboxView->GetLiveboxPopup();
- SysTryReturnVoidResult(NID_UI_CTRL, pLiveboxPopupView, E_SYSTEM, "[E_SYSTEM] A system error occured.");
+ _AppWidgetPopupView* pAppWidgetPopupView = pAppWidgetView->GetAppWidgetPopup();
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidgetPopupView, E_SYSTEM, "[E_SYSTEM] A system error occured.");
- int type = livebox_pd_type(pLivebox);
+ int type = livebox_pd_type(pAppWidget);
// SysLog(NID_UI_CTRL, "type (%d)", type);
{
case PD_TYPE_BUFFER:
{
- void* pBuffer = livebox_acquire_pdfb(pLivebox);
+ void* pBuffer = livebox_acquire_pdfb(pAppWidget);
SysTryReturnVoidResult(NID_UI_CTRL, pBuffer, E_SYSTEM, "[E_SYSTEM] A system error occured.");
- FloatDimension sourceSize = GetLiveboxPopupSize(pLivebox);
+ FloatDimension sourceSize = GetAppWidgetPopupSize(pAppWidget);
unique_ptr<Bitmap> pBitmap(GetBitmapN(pBuffer, sourceSize));
SysTryReturnVoidResult(NID_UI_CTRL, pBitmap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
- pLiveboxPopupView->OnLiveboxUpdated(*pBitmap.get(), sourceSize);
+ pAppWidgetPopupView->OnAppWidgetUpdated(*pBitmap.get(), sourceSize);
livebox_release_pdfb(pBuffer);
pBitmap.release();
}
case PD_TYPE_PIXMAP:
if (__glMode)
{
- pLiveboxPopupView->OnLiveboxUpdated(livebox_pd_pixmap(pLivebox));
+ pAppWidgetPopupView->OnAppWidgetUpdated(livebox_pd_pixmap(pAppWidget));
#if defined(_PIXMAP_TEST)
- DumpPixmap(livebox_pd_pixmap(pLivebox));
+ DumpPixmap(livebox_pd_pixmap(pAppWidget));
#endif // _PIXMAP_TEST
}
else
{
- void* pBuffer = livebox_acquire_pdfb(pLivebox);
+ void* pBuffer = livebox_acquire_pdfb(pAppWidget);
SysTryReturnVoidResult(NID_UI_CTRL, pBuffer, E_SYSTEM, "[E_SYSTEM] A system error occured.");
- FloatDimension sourceSize = GetLiveboxPopupSize(pLivebox);
+ FloatDimension sourceSize = GetAppWidgetPopupSize(pAppWidget);
unique_ptr<Bitmap> pBitmap(GetBitmapN(pBuffer, sourceSize));
SysTryReturnVoidResult(NID_UI_CTRL, pBitmap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
- pLiveboxPopupView->OnLiveboxUpdated(*pBitmap.get(), sourceSize);
+ pAppWidgetPopupView->OnAppWidgetUpdated(*pBitmap.get(), sourceSize);
livebox_release_pdfb(pBuffer);
pBitmap.release();
}
}
int
-_LiveboxViewManager::OnLiveboxEventReceived(livebox* pLivebox, livebox_event_type eventType, void* pData)
+_AppWidgetViewManager::OnAppWidgetEventReceived(livebox* pAppWidget, livebox_event_type eventType, void* pData)
{
- SysTryReturn(NID_UI_CTRL, pLivebox, EXIT_SUCCESS, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ SysTryReturn(NID_UI_CTRL, pAppWidget, EXIT_SUCCESS, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- _LiveboxViewManager* pLiveboxViewManager = static_cast<_LiveboxViewManager*>(pData);
- SysTryReturn(NID_UI_CTRL, pLiveboxViewManager, EXIT_SUCCESS, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ _AppWidgetViewManager* pAppWidgetViewManager = static_cast<_AppWidgetViewManager*>(pData);
+ SysTryReturn(NID_UI_CTRL, pAppWidgetViewManager, EXIT_SUCCESS, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
switch (eventType)
{
case LB_EVENT_LB_UPDATED:
- pLiveboxViewManager->OnLiveboxUpdated(pLivebox);
+ pAppWidgetViewManager->OnAppWidgetUpdated(pAppWidget);
break;
case LB_EVENT_PD_UPDATED:
- pLiveboxViewManager->OnLiveboxPopupUpdated(pLivebox);
+ pAppWidgetViewManager->OnAppWidgetPopupUpdated(pAppWidget);
break;
case LB_EVENT_CREATED:
- pLiveboxViewManager->OnLiveboxCreated(pLivebox);
+ pAppWidgetViewManager->OnAppWidgetCreated(pAppWidget);
break;
case LB_EVENT_DELETED:
- pLiveboxViewManager->OnLiveboxDeleted(pLivebox);
+ pAppWidgetViewManager->OnAppWidgetDeleted(pAppWidget);
break;
case LB_EVENT_GROUP_CHANGED:
break;
case LB_EVENT_PINUP_CHANGED:
- pLiveboxViewManager->OnLiveboxPinUpChanged(pLivebox);
+ pAppWidgetViewManager->OnAppWidgetPinUpChanged(pAppWidget);
break;
case LB_EVENT_PERIOD_CHANGED:
}
int
-_LiveboxViewManager::OnLiveboxFaultReceived(livebox_fault_type faultType, const char* pLiveboxId, const char* pFilename, const char* pFuncName, void* pData)
+_AppWidgetViewManager::OnAppWidgetFaultReceived(livebox_fault_type faultType, const char* pAppWidgetId, const char* pFilename, const char* pFuncName, void* pData)
{
if (faultType == LB_FAULT_DEACTIVATED)
{
- SysLog(NID_UI_CTRL, "type (%d) packageName (%s) fileName (%s) funcName (%s)", faultType, pLiveboxId, pFilename, pFuncName);
- livebox_activate(pLiveboxId, OnLiveboxActivated, pData);
+ SysLog(NID_UI_CTRL, "type (%d) packageName (%s) fileName (%s) funcName (%s)", faultType, pAppWidgetId, pFilename, pFuncName);
+ livebox_activate(pAppWidgetId, OnAppWidgetActivated, pData);
}
return EXIT_SUCCESS;
}
void
-_LiveboxViewManager::OnLiveboxActivated(livebox* pLivebox, int ret, void* pData)
+_AppWidgetViewManager::OnAppWidgetActivated(livebox* pAppWidget, int ret, void* pData)
{
- SysTryReturnVoidResult(NID_UI_CTRL, pLivebox, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidget, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
SysTryReturnVoidResult(NID_UI_CTRL, ret == 0, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- _LiveboxViewManager* pLiveboxViewManager = static_cast<_LiveboxViewManager*>(pData);
- SysTryReturnVoidResult(NID_UI_CTRL, pLiveboxViewManager, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ _AppWidgetViewManager* pAppWidgetViewManager = static_cast<_AppWidgetViewManager*>(pData);
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidgetViewManager, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
}
void
-_LiveboxViewManager::OnLiveboxAdded(livebox* pLivebox, int ret, void* pData)
+_AppWidgetViewManager::OnAppWidgetAdded(livebox* pAppWidget, int ret, void* pData)
{
- SysTryReturnVoidResult(NID_UI_CTRL, pLivebox, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidget, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
SysTryReturnVoidResult(NID_UI_CTRL, ret == 0, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- _LiveboxViewManager* pLiveboxViewManager = static_cast<_LiveboxViewManager*>(pData);
- SysTryReturnVoidResult(NID_UI_CTRL, pLiveboxViewManager, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ _AppWidgetViewManager* pAppWidgetViewManager = static_cast<_AppWidgetViewManager*>(pData);
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidgetViewManager, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
}
void
-_LiveboxViewManager::OnLiveboxDeleted(livebox* pLivebox, int ret, void* pData)
+_AppWidgetViewManager::OnAppWidgetDeleted(livebox* pAppWidget, int ret, void* pData)
{
- SysTryReturnVoidResult(NID_UI_CTRL, pLivebox, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidget, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
SysTryReturnVoidResult(NID_UI_CTRL, ret == 0, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- _LiveboxViewManager* pLiveboxViewManager = static_cast<_LiveboxViewManager*>(pData);
- SysTryReturnVoidResult(NID_UI_CTRL, pLiveboxViewManager, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ _AppWidgetViewManager* pAppWidgetViewManager = static_cast<_AppWidgetViewManager*>(pData);
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidgetViewManager, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
}
void
-_LiveboxViewManager::OnLiveboxResized(livebox* pLivebox, int ret, void* pData)
+_AppWidgetViewManager::OnAppWidgetResized(livebox* pAppWidget, int ret, void* pData)
{
- SysTryReturnVoidResult(NID_UI_CTRL, pLivebox, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidget, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
SysTryReturnVoidResult(NID_UI_CTRL, ret == 0, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- _LiveboxViewManager* pLiveboxViewManager = static_cast<_LiveboxViewManager*>(pData);
- SysTryReturnVoidResult(NID_UI_CTRL, pLiveboxViewManager, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ _AppWidgetViewManager* pAppWidgetViewManager = static_cast<_AppWidgetViewManager*>(pData);
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidgetViewManager, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- pLiveboxViewManager->OnLiveboxUpdated(pLivebox);
+ pAppWidgetViewManager->OnAppWidgetUpdated(pAppWidget);
}
}} // Tizen::Shell
--- /dev/null
+//
+// 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_AppWidgetViewManager.h
+ * @brief This is the header file for the _AppWidgetViewManager class.
+ *
+ * This header file contains the declarations of the %_AppWidgetViewManager class.
+ */
+#ifndef _FSHELL_INTERNAL_APPWIDGET_VIEW_MANAGER_H_
+#define _FSHELL_INTERNAL_APPWIDGET_VIEW_MANAGER_H_
+
+#include <unique_ptr.h>
+#include <FGrpBitmapCommon.h>
+#include <FMediaImageTypes.h>
+
+struct livebox;
+
+namespace Tizen { namespace Base
+{
+class String;
+}}
+
+namespace Tizen { namespace Base { namespace Collection
+{
+template<class KeyType, class ValueType> class HashMapT;
+}}}
+
+namespace Tizen { namespace Graphics
+{
+class Bitmap;
+class FloatDimension;
+class _ICoordinateSystemTransformer;
+}} // Tizen::Graphics
+
+namespace Tizen { namespace Shell
+{
+class _AppWidgetView;
+
+/**
+ * @class _AppWidgetViewManager
+ * @brief
+ * @since 2.1
+ */
+class _AppWidgetViewManager
+{
+public:
+ static _AppWidgetViewManager* GetInstance(void);
+ livebox* AddAppWidgetView(_AppWidgetView* pAppWidgetView, const Tizen::Base::String& userInfo);
+ void RemoveAppWidgetView(_AppWidgetView* pAppWidgetView);
+ _AppWidgetView* GetAppWidgetView(livebox* pAppWidget) const;
+ Tizen::Graphics::FloatDimension GetAppWidgetSize(livebox* pAppWidget) const;
+ Tizen::Graphics::FloatDimension GetAppWidgetPopupSize(livebox* pAppWidget) const;
+ void SetAppWidgetSize(const _AppWidgetView& appwidgetView, const Tizen::Graphics::FloatDimension& size);
+
+private:
+ _AppWidgetViewManager(void);
+ ~_AppWidgetViewManager(void);
+ _AppWidgetViewManager(const _AppWidgetViewManager& rhs);
+ _AppWidgetViewManager& operator =(const _AppWidgetViewManager& rhs);
+
+ int GetAppWidgetSizeType(const Tizen::Graphics::FloatDimension& size) const;
+ Tizen::Media::MediaPixelFormat GetPixelFormat(Tizen::Graphics::BitmapPixelFormat format) const;
+ Tizen::Graphics::Bitmap* GetBitmapN(const Tizen::Base::String& fileName) const;
+ Tizen::Graphics::Bitmap* GetBitmapN(void* pBuffer, const Tizen::Graphics::FloatDimension& size) const;
+ bool IsGlMode(void) const;
+
+ void OnAppWidgetCreated(livebox* pAppWidget);
+ void OnAppWidgetUpdated(livebox* pAppWidget);
+ void OnAppWidgetDeleted(livebox* pAppWidget);
+ void OnAppWidgetPinUpChanged(livebox* pAppWidget);
+ void OnAppWidgetPopupUpdated(livebox* pAppWidget);
+
+ static int OnAppWidgetEventReceived(livebox* pAppWidget, livebox_event_type eventType, void* pData);
+ static int OnAppWidgetFaultReceived(livebox_fault_type faultType, const char* pAppId, const char* pFilename, const char *pFuncName, void* pData);
+ static void OnAppWidgetActivated(livebox* pAppWidget, int ret, void* pData);
+ static void OnAppWidgetAdded(livebox* pAppWidget, int ret, void* pData);
+ static void OnAppWidgetDeleted(livebox *pAppWidget, int ret, void* pData);
+ static void OnAppWidgetResized(livebox* pAppWidget, int ret, void* pData);
+
+private:
+ struct _EventHandlerDeleter
+ {
+ typedef int pointer;
+
+ void operator()(int)
+ {
+ livebox_unset_event_handler(OnAppWidgetEventReceived);
+ }
+ };
+
+ struct _FaultEventHandlerDeleter
+ {
+ typedef int pointer;
+
+ void operator()(int)
+ {
+ livebox_unset_fault_handler(OnAppWidgetFaultReceived);
+ }
+ };
+
+ std::unique_ptr<Tizen::Base::Collection::HashMapT<livebox*, _AppWidgetView*> > __pViewMap;
+ std::unique_ptr<Tizen::Graphics::_ICoordinateSystemTransformer> __pCoordinateTransformer;
+ std::unique_ptr<int, _EventHandlerDeleter> __eventHandler;
+ std::unique_ptr<int, _FaultEventHandlerDeleter> __faultEventHandler;
+ bool __glMode;
+};
+
+}} // Tizen::Shell
+
+#endif // _FSHELL_INTERNAL_APPWIDGET_VIEW_MANAGER_H_
--- /dev/null
+//
+// 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_AppWidgetViewModel.cpp
+ * @brief This is the implementation file for the _AppWidgetViewModel class.
+ */
+
+#include <FBaseSysLog.h>
+#include <FShellAppWidgetManager.h>
+#include <FShellAppWidgetProviderInfo.h>
+#include <FBase_StringConverter.h>
+#include "FShell_AppWidgetViewModel.h"
+
+using namespace std;
+using namespace Tizen::App;
+using namespace Tizen::Base;
+
+namespace Tizen { namespace Shell
+{
+
+_AppWidgetViewModel::_AppWidgetViewModel(void)
+{
+}
+
+_AppWidgetViewModel::~_AppWidgetViewModel(void)
+{
+}
+
+void
+_AppWidgetViewModel::Initialize(const AppId& appId, const Tizen::Base::String& providerName)
+{
+ __appId = appId;
+ __providerName = providerName;
+
+ // todo : _AppWidgetManagerImpl::MakeProviderName
+ if (providerName.IsEmpty())
+ {
+ __appwidgetId = __appId;
+ }
+ else
+ {
+ if (appId.IsEmpty())
+ {
+ __appwidgetId = providerName;
+ }
+ else
+ {
+ __appwidgetId = appId + L"." + providerName;
+ }
+ }
+
+ SysLog(NID_UI_CTRL, "(%ls %ls %ls)", __appId.GetPointer(), __providerName.GetPointer(), __appwidgetId.GetPointer());
+
+ AppWidgetProviderInfo* pAppWidgetProviderInfo = AppWidgetManager::GetInstance()->GetAppWidgetProviderInfoN(appId, providerName);
+ SysTryReturnVoidResult(NID_UI_CTRL, pAppWidgetProviderInfo, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+
+ __pAppWidgetProviderInfo.reset(pAppWidgetProviderInfo);
+
+ SysLog(NID_UI_CTRL, "(%ls %ls)", __appId.GetPointer(), __providerName.GetPointer());
+
+ SysLog(NID_UI_CTRL, "ProviderInfo(%ls %ls %ls %ls)", __pAppWidgetProviderInfo->GetName().GetPointer(), __pAppWidgetProviderInfo->GetDisplayName().GetPointer(),
+ __pAppWidgetProviderInfo->GetIconPath().GetPointer(), __pAppWidgetProviderInfo->GetConfigurationAppControlAppId().GetPointer());
+
+}
+
+AppId
+_AppWidgetViewModel::GetAppId(void) const
+{
+ return __appId;
+}
+
+String
+_AppWidgetViewModel::GetAppWidgetId(void) const
+{
+ return __appwidgetId;
+}
+
+String
+_AppWidgetViewModel::GetProviderName(void) const
+{
+ return __providerName;
+}
+
+String
+_AppWidgetViewModel::GetDisplayName(void) const
+{
+ return __pAppWidgetProviderInfo->GetDisplayName();
+}
+
+String
+_AppWidgetViewModel::GetAppIconPath(void) const
+{
+ return __pAppWidgetProviderInfo->GetIconPath();
+}
+
+}} // Tizen::Shell
// limitations under the License.
//
/**
- * @file FShell_LiveboxViewModel.h
- * @brief This is the header file for the _LiveboxViewModel class.
+ * @file FShell_AppWidgetViewModel.h
+ * @brief This is the header file for the _AppWidgetViewModel class.
*
- * This header file contains the declarations of the %_LiveboxViewModel class.
+ * This header file contains the declarations of the %_AppWidgetViewModel class.
*/
-#ifndef _FSHELL_INTERNAL_LIVEBOX_VIEW_MODEL_H_
-#define _FSHELL_INTERNAL_LIVEBOX_VIEW_MODEL_H_
+#ifndef _FSHELL_INTERNAL_APPWIDGET_VIEW_MODEL_H_
+#define _FSHELL_INTERNAL_APPWIDGET_VIEW_MODEL_H_
#include <unique_ptr.h>
#include <FAppTypes.h>
namespace Tizen { namespace Shell
{
-class LiveboxProviderInfo;
+class AppWidgetProviderInfo;
-class _LiveboxViewModel
+class _AppWidgetViewModel
: public Tizen::Base::Object
{
public:
- _LiveboxViewModel(void);
- virtual ~_LiveboxViewModel(void);
+ _AppWidgetViewModel(void);
+ virtual ~_AppWidgetViewModel(void);
public:
void Initialize(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName);
Tizen::App::AppId GetAppId(void) const;
- Tizen::Base::String GetLiveboxId(void) const;
+ Tizen::Base::String GetAppWidgetId(void) const;
Tizen::Base::String GetProviderName(void) const;
Tizen::Base::String GetDisplayName(void) const;
Tizen::Base::String GetAppIconPath(void) const;
private:
- _LiveboxViewModel(const _LiveboxViewModel& rhs);
- _LiveboxViewModel& operator =(const _LiveboxViewModel& rhs);
+ _AppWidgetViewModel(const _AppWidgetViewModel& rhs);
+ _AppWidgetViewModel& operator =(const _AppWidgetViewModel& rhs);
private:
Tizen::Base::String __appId;
- Tizen::Base::String __liveboxId;
+ Tizen::Base::String __appwidgetId;
Tizen::Base::String __providerName;
- std::unique_ptr<LiveboxProviderInfo> __pLiveboxProviderInfo;
-}; // _LiveboxViewModel
+ std::unique_ptr<AppWidgetProviderInfo> __pAppWidgetProviderInfo;
+}; // _AppWidgetViewModel
}} // Tizen::Shell
-#endif // _FSHELL_INTERNAL_LIVEBOX_VIEW_MODEL_H_
+#endif // _FSHELL_INTERNAL_APPWIDGET_VIEW_MODEL_H_
// limitations under the License.
//
/**
- * @file FShell_LiveboxViewPresenter.cpp
- * @brief This is the implementation file for the _LiveboxViewPresenter class.
+ * @file FShell_AppWidgetViewPresenter.cpp
+ * @brief This is the implementation file for the _AppWidgetViewPresenter class.
*/
#include <new>
#include <FGrp_CanvasImpl.h>
#include <FGrp_TextTextObject.h>
#include <FGrp_TextTextSimple.h>
-#include "FShell_LiveboxViewPresenter.h"
-#include "FShell_LiveboxView.h"
-#include "FShell_LiveboxViewModel.h"
+#include "FShell_AppWidgetViewPresenter.h"
+#include "FShell_AppWidgetView.h"
+#include "FShell_AppWidgetViewModel.h"
using namespace std;
using namespace Tizen::App;
namespace Tizen { namespace Shell
{
-_LiveboxViewPresenter::_LiveboxViewPresenter(const _LiveboxView& liveBoxView)
- : __pLiveboxView(const_cast <_LiveboxView*>(&liveBoxView))
- , __pLiveboxViewModel(new (std::nothrow) _LiveboxViewModel())
+_AppWidgetViewPresenter::_AppWidgetViewPresenter(const _AppWidgetView& appwidgetView)
+ : __pAppWidgetView(const_cast <_AppWidgetView*>(&appwidgetView))
+ , __pAppWidgetViewModel(new (std::nothrow) _AppWidgetViewModel())
, __pSimpleText(null)
{
- SysTryReturnVoidResult(NID_UI_CTRL, __pLiveboxViewModel, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ SysTryReturnVoidResult(NID_UI_CTRL, __pAppWidgetViewModel, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
}
-_LiveboxViewPresenter::~_LiveboxViewPresenter(void)
+_AppWidgetViewPresenter::~_AppWidgetViewPresenter(void)
{
- __pLiveboxView = null;
+ __pAppWidgetView = null;
}
result
-_LiveboxViewPresenter::Initialize(const AppId& appId, const Tizen::Base::String& providerName)
+_AppWidgetViewPresenter::Initialize(const AppId& appId, const Tizen::Base::String& providerName)
{
const int FONT_SIZE = 20;
- __pLiveboxViewModel->Initialize(appId, providerName);
+ __pAppWidgetViewModel->Initialize(appId, providerName);
unique_ptr<Font> pFont(new (std::nothrow) Font());
SysTryReturn(NID_UI_CTRL, pFont, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
}
AppId
-_LiveboxViewPresenter::GetAppId(void) const
+_AppWidgetViewPresenter::GetAppId(void) const
{
- return __pLiveboxViewModel->GetAppId();
+ return __pAppWidgetViewModel->GetAppId();
}
String
-_LiveboxViewPresenter::GetLiveboxId(void) const
+_AppWidgetViewPresenter::GetAppWidgetId(void) const
{
- return __pLiveboxViewModel->GetLiveboxId();
+ return __pAppWidgetViewModel->GetAppWidgetId();
}
+String
+_AppWidgetViewPresenter::GetProviderName(void) const
+{
+ return __pAppWidgetViewModel->GetProviderName();
+}
String
-_LiveboxViewPresenter::GetDisplayName(void) const
+_AppWidgetViewPresenter::GetDisplayName(void) const
{
- return __pLiveboxViewModel->GetDisplayName();
+ return __pAppWidgetViewModel->GetDisplayName();
}
String
-_LiveboxViewPresenter::GetAppIconPath(void) const
+_AppWidgetViewPresenter::GetAppIconPath(void) const
{
- return __pLiveboxViewModel->GetAppIconPath();
+ return __pAppWidgetViewModel->GetAppIconPath();
}
void
-_LiveboxViewPresenter::Draw(void)
+_AppWidgetViewPresenter::Draw(void)
{
- Bitmap* pBitmap = __pLiveboxView->GetBitmap();
+ Bitmap* pBitmap = __pAppWidgetView->GetBitmap();
bool imageDone = false;
if (pBitmap)
}
else
{
- pBitmap = __pLiveboxView->GetAppIconBitmap();
+ pBitmap = __pAppWidgetView->GetAppIconBitmap();
}
SysTryReturnVoidResult(NID_UI_CTRL, pBitmap, E_SYSTEM, "Bitmap is invalid (%d).", imageDone);
- Dimension liveboxSize = __pLiveboxView->GetSize();
+ Dimension appwidgetSize = __pAppWidgetView->GetSize();
int bitmapWidth = pBitmap->GetWidth();
int bitmapHeight = pBitmap->GetHeight();
if (!imageDone)
{
- if (liveboxSize.width != bitmapWidth)
+ if (appwidgetSize.width != bitmapWidth)
{
- point.x = (liveboxSize.width / 2) - (bitmapWidth / 2);
+ point.x = (appwidgetSize.width / 2) - (bitmapWidth / 2);
}
- if (liveboxSize.height != bitmapHeight)
+ if (appwidgetSize.height != bitmapHeight)
{
- point.y = (liveboxSize.height / 2) - (bitmapHeight / 2);
+ point.y = (appwidgetSize.height / 2) - (bitmapHeight / 2);
}
}
- unique_ptr<Canvas> pCanvas(__pLiveboxView->GetCanvasN());
+ unique_ptr<Canvas> pCanvas(__pAppWidgetView->GetCanvasN());
SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
}
else
{
- Rectangle rect = __pLiveboxView->GetBounds();
+ Rectangle rect = __pAppWidgetView->GetBounds();
rect.x = 0;
rect.y = 0;
}
void
-_LiveboxViewPresenter::DrawText(Canvas& canvas)
+_AppWidgetViewPresenter::DrawText(Canvas& canvas)
{
const int TEXT_OBJECT_HEIGHT = 25;
result r = E_SUCCESS;
__pSimpleText = pSimpleText.release();
}
- Rectangle liveboxBounds(__pLiveboxView->GetBounds());
+ Rectangle appwidgetBounds(__pAppWidgetView->GetBounds());
- __pTextObject->SetBounds(Rectangle(0, liveboxBounds.height - TEXT_OBJECT_HEIGHT, liveboxBounds.width, TEXT_OBJECT_HEIGHT));
+ __pTextObject->SetBounds(Rectangle(0, appwidgetBounds.height - TEXT_OBJECT_HEIGHT, appwidgetBounds.width, TEXT_OBJECT_HEIGHT));
__pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE);
__pTextObject->SetFont(__pFont.get(), 0, __pTextObject->GetTextLength());
// limitations under the License.
//
/**
- * @file FShell_LiveboxViewPresenter.h
- * @brief This is the header file for the _LiveboxViewPresenter class.
+ * @file FShell_AppWidgetViewPresenter.h
+ * @brief This is the header file for the _AppWidgetViewPresenter class.
*
- * This header file contains the declarations of the %_LiveboxViewPresenter class.
+ * This header file contains the declarations of the %_AppWidgetViewPresenter class.
*/
-#ifndef _FSHELL_INTERNAL_LIVEBOX_VIEW_PRESENTER_H_
-#define _FSHELL_INTERNAL_LIVEBOX_VIEW_PRESENTER_H_
+#ifndef _FSHELL_INTERNAL_APPWIDGET_VIEW_PRESENTER_H_
+#define _FSHELL_INTERNAL_APPWIDGET_VIEW_PRESENTER_H_
#include <unique_ptr.h>
#include <FAppTypes.h>
namespace Tizen { namespace Shell
{
-class _LiveboxView;
-class _LiveboxViewModel;
+class _AppWidgetView;
+class _AppWidgetViewModel;
-class _LiveboxViewPresenter
+class _AppWidgetViewPresenter
{
public:
- _LiveboxViewPresenter(const _LiveboxView& liveBoxView);
- virtual ~_LiveboxViewPresenter(void);
+ _AppWidgetViewPresenter(const _AppWidgetView& appwidgetView);
+ virtual ~_AppWidgetViewPresenter(void);
result Initialize(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName);
Tizen::App::AppId GetAppId(void) const;
- Tizen::Base::String GetLiveboxId(void) const;
+ Tizen::Base::String GetAppWidgetId(void) const;
+ Tizen::Base::String GetProviderName(void) const;
Tizen::Base::String GetDisplayName(void) const;
Tizen::Base::String GetAppIconPath(void) const;
void DrawText(Tizen::Graphics::Canvas& canvas);
private:
- _LiveboxViewPresenter(const _LiveboxViewPresenter& rhs);
- _LiveboxViewPresenter& operator =(const _LiveboxViewPresenter& rhs);
+ _AppWidgetViewPresenter(const _AppWidgetViewPresenter& rhs);
+ _AppWidgetViewPresenter& operator =(const _AppWidgetViewPresenter& rhs);
private:
- _LiveboxView* __pLiveboxView;
- std::unique_ptr<_LiveboxViewModel> __pLiveboxViewModel;
+ _AppWidgetView* __pAppWidgetView;
+ std::unique_ptr<_AppWidgetViewModel> __pAppWidgetViewModel;
std::unique_ptr<Tizen::Graphics::Font> __pFont;
std::unique_ptr<Tizen::Graphics::_Text::TextObject> __pTextObject;
Tizen::Graphics::_Text::TextSimple* __pSimpleText;
-}; // _LiveboxViewPresenter
+}; // _AppWidgetViewPresenter
}} // Tizen::Shell
-#endif // _FSHELL_INTERNAL_LIVEBOX_VIEW_PRESENTER_H_
+#endif // _FSHELL_INTERNAL_APPWIDGET_VIEW_PRESENTER_H_
// limitations under the License.
//
/**
- * @file FShell_ILiveboxPopupViewEventListener.h
- * @brief This is the header file for the _ILiveboxPopupViewEventListener interface.
+ * @file FShell_IAppWidgetPopupViewEventListener.h
+ * @brief This is the header file for the _IAppWidgetPopupViewEventListener interface.
*
- * This header file contains the declarations of the _ILiveboxPopupViewEventListener interface.
+ * This header file contains the declarations of the _IAppWidgetPopupViewEventListener interface.
*/
-#ifndef _FSHELL_INTERNAL_ILIVEBOX_POPUP_VIEW_EVENT_LISTENER_H_
-#define _FSHELL_INTERNAL_ILIVEBOX_POPUP_VIEW_EVENT_LISTENER_H_
+#ifndef _FSHELL_INTERNAL_IAPPWIDGET_POPUP_VIEW_EVENT_LISTENER_H_
+#define _FSHELL_INTERNAL_IAPPWIDGET_POPUP_VIEW_EVENT_LISTENER_H_
#include <FBaseRtIEventListener.h>
{
/**
- * @interface _ILiveboxPopupViewEventListener
+ * @interface _IAppWidgetPopupViewEventListener
* @brief This interface implements the listener for keypad events.
* @since 2.1
*
- * The _ILiveboxPopupViewEventListener interface enables the implementer to receive the
+ * The _IAppWidgetPopupViewEventListener interface enables the implementer to receive the
* software keypad related events.
*/
-class _ILiveboxPopupViewEventListener
- : virtual public Tizen::Base::Runtime::IEventListener
+class _IAppWidgetPopupViewEventListener
+ : public Tizen::Base::Runtime::IEventListener
{
public:
/**
* This is the destructor for this class.
* @since 2.1
*/
- virtual ~_ILiveboxPopupViewEventListener(void) {}
+ virtual ~_IAppWidgetPopupViewEventListener(void) {}
public:
- virtual void OnLiveboxPopupViewOpened(void) = 0;
- virtual void OnLiveboxPopupViewClosed(void) = 0;
-}; // _ILiveboxPopupViewEventListener
+ virtual void OnAppWidgetPopupViewOpened(void) = 0;
+ virtual void OnAppWidgetPopupViewClosed(void) = 0;
+}; // _IAppWidgetPopupViewEventListener
}} // Tizen::Shell
-#endif // _FSHELL_INTERNAL_ILIVEBOX_POPUP_VIEW_EVENT_LISTENER_H_
+#endif // _FSHELL_INTERNAL_IAPPWIDGET_POPUP_VIEW_EVENT_LISTENER_H_
--- /dev/null
+//
+// 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_IAppWidgetViewEventListener.h
+ * @brief This is the header file for the %_IAppWidgetViewEventListener interface.
+ *
+ * This header file contains the declarations of the %_IAppWidgetViewEventListener interface.
+ */
+
+#ifndef _FSHELL_INTERNAL_IAPP_WIDGET_VIEW_EVENT_LISTENER_H_
+#define _FSHELL_INTERNAL_IAPP_WIDGET_VIEW_EVENT_LISTENER_H_
+
+#include <FBaseRtIEventListener.h>
+
+namespace Tizen { namespace Shell
+{
+
+class _AppWidgetView;
+
+/*
+ * @interface _IAppWidgetViewEventListener
+ * @brief This interface defines a listener for the AppWidgetView that receives AppWidgetProvider removed event.
+ *
+ * @since 2.1
+ *
+ * The %_IAppWidgetViewEventListener interface defines a listener for the AppWidgetView that receives AppWidgetProvider removed event.
+ */
+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
+ */
+ virtual ~_IAppWidgetViewEventListener(void) {}
+
+ /*\r
+ * Called when a AppWidgetProvider instance is about to be removed. @n
+ *\r
+ * @since 2.1\r
+ *\r
+ * @param[in] appwidgetView The source of the event
+ */\r
+ virtual void OnAppWidgetProviderRemoved(_AppWidgetView& appwidgetView) = 0;
+};
+
+}} // Tizen::Shell
+
+#endif /* _FSHELL_INTERNAL_IAPP_WIDGET_VIEW_EVENT_LISTENER_H_ */
+++ /dev/null
-//
-// 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.
-//
-
-#include <new>
-#include <unique_ptr.h>
-#include <FBaseSysLog.h>
-#include "FShell_LiveboxFrameImpl.h"
-
-using namespace std;
-using namespace Tizen::Base;
-using namespace Tizen::Graphics;
-using namespace Tizen::Ui;
-
-namespace Tizen { namespace Shell
-{
-
-const _LiveboxFrameImpl*
-_LiveboxFrameImpl::GetInstance(const LiveboxFrame& liveboxFrame)
-{
- return static_cast<const _LiveboxFrameImpl*>(_ControlImpl::GetInstance(liveboxFrame));
-}
-
-_LiveboxFrameImpl*
-_LiveboxFrameImpl::GetInstance(LiveboxFrame& liveboxFrame)
-{
- return static_cast<_LiveboxFrameImpl*>(_ControlImpl::GetInstance(liveboxFrame));
-}
-
-_LiveboxFrameImpl*
-_LiveboxFrameImpl::CreateLiveboxFrameImplN(LiveboxFrame& liveboxFrame, const Layout* pPortraitLayout, const Layout* pLandscapeLayout)
-{
- unique_ptr<_LiveboxFrame> pCore(_LiveboxFrame::CreateLiveboxFrameN());
- result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pCore, null, r, "[%s] Propagating.", GetErrorMessage(r));
-
- unique_ptr<_LiveboxFrameImpl> pImpl(new (std::nothrow) _LiveboxFrameImpl(&liveboxFrame, pCore.get(), pPortraitLayout, pLandscapeLayout));
- SysTryReturn(NID_UI_CTRL, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
-
- pCore.release();
-
- r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
-
- return pImpl.release();
-}
-
-_LiveboxFrameImpl::_LiveboxFrameImpl(LiveboxFrame* pPublic, _LiveboxFrame* pCore, const Layout* pPortraitLayout, const Layout* pLandscapeLayout)
- : _WindowImpl(pPublic, pCore, pPortraitLayout, pLandscapeLayout)
-{
-}
-
-_LiveboxFrameImpl::~_LiveboxFrameImpl(void)
-{
-}
-
-const char*
-_LiveboxFrameImpl::GetPublicClassName(void) const
-{
- return "Tizen::Shell::LiveboxFrame";
-}
-
-const LiveboxFrame&
-_LiveboxFrameImpl::GetPublic(void) const
-{
- return static_cast<const LiveboxFrame&>(_ControlImpl::GetPublic());
-}
-
-LiveboxFrame&
-_LiveboxFrameImpl::GetPublic(void)
-{
- return static_cast<LiveboxFrame&>(_ControlImpl::GetPublic());
-}
-
-const _LiveboxFrame&
-_LiveboxFrameImpl::GetCore(void) const
-{
- return static_cast<const _LiveboxFrame&>(_ControlImpl::GetCore());
-}
-
-_LiveboxFrame&
-_LiveboxFrameImpl::GetCore(void)
-{
- return static_cast<_LiveboxFrame&>(_ControlImpl::GetCore());
-}
-
-result
-_LiveboxFrameImpl::Initialize(const FloatDimension& size)
-{
- result r = GetCore().Initialize(size);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- return r;
-}
-
-result
-_LiveboxFrameImpl::SetProviderId(const String& providerId)
-{
- result r = GetCore().SetProviderId(providerId);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- return r;
-}
-
-}} // Tizen::Shell
+++ /dev/null
-//
-// 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.
-//
-#ifndef _FSHELL_INTERNAL_LIVEBOX_FRAME_IMPL_H_
-#define _FSHELL_INTERNAL_LIVEBOX_FRAME_IMPL_H_
-
-#include <FShellLiveboxFrame.h>
-#include "FUi_WindowImpl.h"
-#include "FShell_LiveboxFrame.h"
-
-namespace Tizen { namespace Ui
-{
-class Layout;
-}} // Tizen::Ui
-
-namespace Tizen { namespace Shell
-{
-
-class _LiveboxFrameImpl
- : public Tizen::Ui::_WindowImpl
-{
-public:
- static _LiveboxFrameImpl* CreateLiveboxFrameImplN(LiveboxFrame& liveboxFrame, const Tizen::Ui::Layout* pPortraitLayout, const Tizen::Ui::Layout* pLandscapeLayout);
- static const _LiveboxFrameImpl* GetInstance(const LiveboxFrame& liveboxFrame);
- static _LiveboxFrameImpl* GetInstance(LiveboxFrame& liveboxFrame);
-
- virtual ~_LiveboxFrameImpl(void);
-
- virtual const char* GetPublicClassName(void) const;
- virtual const LiveboxFrame& GetPublic(void) const;
- virtual LiveboxFrame& GetPublic(void);
- virtual const _LiveboxFrame& GetCore(void) const;
- virtual _LiveboxFrame& GetCore(void);
-
- result Initialize(const Tizen::Graphics::FloatDimension& size);
- result SetProviderId(const Tizen::Base::String& providerId);
-
-protected:
- _LiveboxFrameImpl(LiveboxFrame* pPublic, _LiveboxFrame* pCore, const Tizen::Ui::Layout* pPortraitLayout, const Tizen::Ui::Layout* pLandscapeLayout);
-
-private:
- _LiveboxFrameImpl(const _LiveboxFrameImpl& rhs);
- _LiveboxFrameImpl& operator =(const _LiveboxFrameImpl& rhs);
-}; // _LiveboxFrameImpl
-
-}} // Tizen::Shell::Ui::Controls
-
-#endif // _FSHELL_INTERNAL_LIVEBOX_FRAME_IMPL_H_
+++ /dev/null
-//
-// 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_LiveboxManagerImpl.cpp
- * @brief This is the implementation for the _LiveboxManagerImpl class.
- */
-
-#include <unique_ptr.h>
-
-#include <shortcut.h>
-#include <livebox-service/livebox-service.h>
-
-#include <FBaseSysLog.h>
-#include <FBase.h>
-#include <FApp.h>
-#include <FGrpDimension.h>
-#include <FApp_AppImpl.h>
-#include <FBase_StringConverter.h>
-
-#include <FShellLiveboxProviderInfo.h>
-#include <FShellLiveboxProvider.h>
-#include <FShellLiveboxPopupProvider.h>
-#include <FShellLiveboxFrame.h>
-#include <FShellLiveboxPopup.h>
-
-#include <FShellILiveboxAddRequestListener.h>
-#include <FShellILiveboxProviderFactory.h>
-#include <FShellILiveboxPopupProviderFactory.h>
-
-#include <FShell_ILiveboxTouchEventListener.h>
-#include <FShell_TemplateUtil.h>
-
-#include "FShell_ShortcutManagerImpl.h"
-#include "FShell_LiveboxManagerProxy.h"
-#include "FShell_LiveboxManagerImpl.h"
-#include "FShell_LiveboxProviderInfoImpl.h"
-
-namespace Tizen { namespace Shell
-{
-
-using namespace Tizen::Base;
-using namespace Tizen::Base::Collection;
-using namespace Tizen::App;
-using namespace Tizen::Graphics;
-
-_LiveboxManagerImpl::_LiveboxManagerImpl()
- :__pLiveboxRequestEventListener(null)
-{
- SysLog(NID_APP, "");
-}
-
-_LiveboxManagerImpl::~_LiveboxManagerImpl()
-{
- SysLog(NID_APP, "");
- livebox_service_fini();
-}
-
-_LiveboxManagerImpl*
-_LiveboxManagerImpl::GetInstance()
-{
- static _LiveboxManagerImpl* __pLiveboxManagerImpl = null;
- if( __pLiveboxManagerImpl == null)
- {
- __pLiveboxManagerImpl = new (std::nothrow)_LiveboxManagerImpl;
- SysTryReturn(NID_APP, __pLiveboxManagerImpl, null, E_OUT_OF_MEMORY, "Allocating new _LiveboxManagerProxy failed.");
-
- result r = __pLiveboxManagerImpl->Construct();
- SysTryReturn(NID_APP, !IsFailed(r), null, r, "[%s] Propagating.", GetErrorMessage(r));
- }
- return __pLiveboxManagerImpl;
-}
-
-result
-_LiveboxManagerImpl::Construct()
-{
- SysLog(NID_APP, "Enter.");
-
- int ret = livebox_service_init();
- SysTryReturnResult(NID_APP, ret == 0, E_SYSTEM, "[E_SYSTEM] Failed to invoke livebox_service_init, ret (%d)", ret);
-
- SysLog(NID_APP, "Exit.");
- return E_SUCCESS;
-}
-
-// c style callback for livebox_service_get_pkglist
-int GetLiveboxProviderInfoCallback(const char *packageId, const char *pProviderId, int is_prime, void *data)
-{
- SysLog(NID_APP, "%s, %s", packageId, pProviderId);
-
- IList* pLiveboxProviderInfos = static_cast<IList*>(data);
- SysTryReturn(NID_APP, pLiveboxProviderInfos, 0, E_SYSTEM, "[E_SYSTEM] system error.");
-
- String providerId(pProviderId);
- String appId;
- String providerName;
- _LiveboxManagerImpl::ExtractAppIdAndProviderName(providerId, appId, providerName);
-
- LiveboxProviderInfo* pInfo = _LiveboxProviderInfoImpl::GetLiveboxProviderInfoN(appId, providerName, is_prime);
- pLiveboxProviderInfos->Add(*pInfo);
-
- return 0;
-}
-
-Tizen::Base::Collection::IList*
-_LiveboxManagerImpl::GetLiveboxProviderInfoListN()
-{
- std::unique_ptr<ArrayList> pLiveboxProviders(new (std::nothrow) ArrayList());
- SysTryReturn(NID_APP, pLiveboxProviders.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
-
- pLiveboxProviders->Construct();
- int ret = livebox_service_get_pkglist(GetLiveboxProviderInfoCallback, pLiveboxProviders.get());
- if (ret < 0)
- {
- SysLog(NID_APP, "Failed to invoke livebox_service_get_pkglist, ret (%d)", ret);
- }
-
- if (pLiveboxProviders->GetCount() <= 0)
- {
- return null;
- }
-
- return pLiveboxProviders.release();
-}
-
-LiveboxProviderInfo*
-_LiveboxManagerImpl::GetLiveboxProviderInfoN(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName)
-{
- return _LiveboxProviderInfoImpl::GetLiveboxProviderInfoN(appId, providerName);
-}
-
-const int PROVIDER_NAME_MAX = 256;
-char __tempDefaultProviderResult[PROVIDER_NAME_MAX];
-
-// c style callback for livebox_service_get_pkglist
-int GetDefaultLiveboxProviderInfoCallback(const char *packageId, const char *pProviderId, int is_prime, void *data)
-{
- SysLog(NID_APP, "%s, %s", packageId, pProviderId);
- char* pInputProviderId = static_cast<char*>(data);
- SysTryReturn(NID_APP, pInputProviderId, 0, E_SYSTEM, "[E_SYSTEM] system error.");
-
- if( strncmp(packageId, pInputProviderId, PROVIDER_NAME_MAX) == 0)
- {
- strncpy(__tempDefaultProviderResult, pProviderId, PROVIDER_NAME_MAX);
- return -1;
- }
-
- return 0;
-}
-
-LiveboxProviderInfo*
-_LiveboxManagerImpl::GetDefaultLiveboxProviderInfoN(const Tizen::App::PackageId& packageId)
-{
- memset(__tempDefaultProviderResult, 0, sizeof(__tempDefaultProviderResult));
-
- LiveboxProviderInfo* pInfo = null;
- std::unique_ptr<char[]> pPackageId(_StringConverter::CopyToCharArrayN(packageId));
-
- int ret = livebox_service_get_pkglist(GetDefaultLiveboxProviderInfoCallback, pPackageId.get());
- if (ret < 0)
- {
- SysLog(NID_APP, "There is no Livebox provider specifed, or It's failed to invoke livebox_service_get_pkglist, ret (%d)", ret);
- return null;
- }
-
- String defaultProvider(__tempDefaultProviderResult);
- if( !defaultProvider.IsEmpty())
- {
- String appId;
- String providerName;
- _LiveboxManagerImpl::ExtractAppIdAndProviderName(__tempDefaultProviderResult, appId, providerName);
-
- pInfo = _LiveboxProviderInfoImpl::GetLiveboxProviderInfoN(appId, providerName, true);
- }
- return pInfo;
-}
-
-
-bool __isDefault;
-// c style callback for livebox_service_get_pkglist
-int IsLiveboxProviderDefaultInfoCallback(const char *packageId, const char *pProviderId, int is_prime, void *data)
-{
- __isDefault = false;
- SysLog(NID_APP, "%s, %s", packageId, pProviderId);
- char* pInputProviderId = static_cast<char*>(data);
- SysTryReturn(NID_APP, pInputProviderId, 0, E_SYSTEM, "[E_SYSTEM] system error.");
-
- if( strncmp(packageId, pInputProviderId, 256) == 0)
- {
- __isDefault = is_prime;
- return -1;
- }
-
- return 0;
-}
-
-bool
-_LiveboxManagerImpl::IsLiveboxProviderDefault(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName)
-{
- __isDefault = false;
-
- std::unique_ptr<char[]> pPackageId(_StringConverter::CopyToCharArrayN(_LiveboxManagerImpl::MakeProviderName(appId, providerName)));
-
- int ret = livebox_service_get_pkglist(IsLiveboxProviderDefaultInfoCallback, pPackageId.get());
- if (ret < 0)
- {
- SysLog(NID_APP, "Failed to invoke livebox_service_get_pkglist, ret (%d)", ret);
- }
-
- return __isDefault;
-}
-
-// c - style callback for shortcut_set_request_cb
-int LiveboxRequestHandlerCallback(const char* providerId, const char* text, int type, const char* content_info, const char* icon, int pid, double period, void *data)
-{
- SysLog(NID_APP, "Enter");
- SysTryReturn(NID_APP, providerId, 0, E_SYSTEM, "[E_SYSTEM] providerId is null!");
-
- _LiveboxManagerImpl* pLiveboxManager = static_cast<_LiveboxManagerImpl*>(data);
- SysTryReturn(NID_APP, pLiveboxManager, 0, E_SYSTEM, "[E_SYSTEM] pLiveboxManager is null!");
-
- String appId;
- String providerName;
- _LiveboxManagerImpl::ExtractAppIdAndProviderName(providerId, appId, providerName);
-
- ILiveboxAddRequestListener* pListener = _LiveboxManagerImpl::GetInstance()->GetAddRequestListener();
- SysTryReturn(NID_APP, pLiveboxManager, 0, E_SYSTEM, "[E_SYSTEM] pListener is null!");
- pListener->OnLiveboxAddRequested(appId, providerName, text, content_info);
- return 0;
-}
-
-result
-_LiveboxManagerImpl::SetLiveboxAddRequestListener(ILiveboxAddRequestListener* pListener)
-{
-// int ret = shortcut_set_request_cb(LiveboxRequestHandlerCallback, this );
-// SysTryReturnResult(NID_APP, ret == 0, E_SYSTEM, "failed to shortcut_set_request_cb (%d)", ret);
- _ShortcutManagerImpl::GetInstance()->SetLiveboxRequestHandlerCallback(LiveboxRequestHandlerCallback);
-
- __pLiveboxRequestEventListener = pListener;
- return E_SUCCESS;
-}
-
-ILiveboxAddRequestListener*
-_LiveboxManagerImpl::GetAddRequestListener()
-{
- return __pLiveboxRequestEventListener;
-}
-
-// helper
-result
-_LiveboxManagerImpl::ExtractAppIdAndProviderName(const Tizen::Base::String& providerId, Tizen::App::AppId& appId, Tizen::Base::String& providerName)
-{
- if( providerId.StartsWith("com.samsung", 0) == true)// for core livebox (plugin)
- {
- appId = providerId;
- providerName = L"";
- }
- else
- {
- int index = 0;
-
- providerId.IndexOf(".", 11, index);
- providerId.SubString(0, index, appId);
- providerId.SubString(index+1, providerName);
- }
-
- return E_SUCCESS;
-}
-
-String
-_LiveboxManagerImpl::MakeProviderName(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName)
-{
- String providerId;
-
- if( appId.StartsWith("com.samsung", 0) == true)// for core livebox (plugin)
- {
- // or providerName.IsEmpty()
- providerId = appId;
- }
- else
- {
- // for web
- if (appId.IsEmpty())
- {
- providerId.Format(128, L"%ls", providerName.GetPointer() );
- }
- else
- {
- providerId.Format(128, L"%ls.%ls", appId.GetPointer(), providerName.GetPointer() );
- }
- }
-
- return providerId;
-}
-
-}} // Tizen::Shell
+++ /dev/null
-//
-// 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.
-//
-
-#include <new>
-#include <unique_ptr.h>
-#include <FBaseSysLog.h>
-#include "FShell_LiveboxPopupImpl.h"
-
-using namespace std;
-using namespace Tizen::Base;
-using namespace Tizen::Graphics;
-using namespace Tizen::Ui;
-
-namespace Tizen { namespace Shell
-{
-
-const _LiveboxPopupImpl*
-_LiveboxPopupImpl::GetInstance(const LiveboxPopup& liveboxPopup)
-{
- return static_cast<const _LiveboxPopupImpl*>(_ControlImpl::GetInstance(liveboxPopup));
-}
-
-_LiveboxPopupImpl*
-_LiveboxPopupImpl::GetInstance(LiveboxPopup& liveboxPopup)
-{
- return static_cast<_LiveboxPopupImpl*>(_ControlImpl::GetInstance(liveboxPopup));
-}
-
-_LiveboxPopupImpl*
-_LiveboxPopupImpl::CreateLiveboxPopupImplN(LiveboxPopup& liveboxPopup, const Layout* pPortraitLayout, const Layout* pLandscapeLayout)
-{
- unique_ptr<_LiveboxPopup> pCore(_LiveboxPopup::CreateLiveboxPopupN());
- result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pCore, null, r, "[%s] Propagating.", GetErrorMessage(r));
-
- unique_ptr<_LiveboxPopupImpl> pImpl(new (std::nothrow) _LiveboxPopupImpl(&liveboxPopup, pCore.get(), pPortraitLayout, pLandscapeLayout));
- SysTryReturn(NID_UI_CTRL, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
-
- pCore.release();
-
- r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
-
- return pImpl.release();
-}
-
-_LiveboxPopupImpl::_LiveboxPopupImpl(LiveboxPopup* pPublic, _LiveboxPopup* pCore, const Layout* pPortraitLayout, const Layout* pLandscapeLayout)
- : _WindowImpl(pPublic, pCore, pPortraitLayout, pLandscapeLayout)
-{
-}
-
-_LiveboxPopupImpl::~_LiveboxPopupImpl(void)
-{
-}
-
-const char*
-_LiveboxPopupImpl::GetPublicClassName(void) const
-{
- return "Tizen::Shell::LiveboxPopup";
-}
-
-const LiveboxPopup&
-_LiveboxPopupImpl::GetPublic(void) const
-{
- return static_cast<const LiveboxPopup&>(_ControlImpl::GetPublic());
-}
-
-LiveboxPopup&
-_LiveboxPopupImpl::GetPublic(void)
-{
- return static_cast<LiveboxPopup&>(_ControlImpl::GetPublic());
-}
-
-const _LiveboxPopup&
-_LiveboxPopupImpl::GetCore(void) const
-{
- return static_cast<const _LiveboxPopup&>(_ControlImpl::GetCore());
-}
-
-_LiveboxPopup&
-_LiveboxPopupImpl::GetCore(void)
-{
- return static_cast<_LiveboxPopup&>(_ControlImpl::GetCore());
-}
-
-result
-_LiveboxPopupImpl::Initialize(const FloatDimension& size)
-{
- result r = GetCore().Initialize(size);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- return r;
-}
-
-result
-_LiveboxPopupImpl::SetProviderId(const String& providerId)
-{
- result r = GetCore().SetProviderId(providerId);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- return r;
-}
-
-String
-_LiveboxPopupImpl::GetProviderId(void) const
-{
- return GetCore().GetProviderId();
-}
-
-void
-_LiveboxPopupImpl::SetAnchorPosition(const FloatPoint& position)
-{
- GetCore().SetAnchorPosition(position);
-}
-
-FloatPoint
-_LiveboxPopupImpl::GetAnchorPosition(void) const
-{
- return GetCore().GetAnchorPosition();
-}
-
-FloatRectangle\r
-_LiveboxPopupImpl::GetClientAreaBounds(void) const\r
-{\r
- return GetClientBoundsF();\r
-}\r
-\r
-Canvas*\r
-_LiveboxPopupImpl::GetClientAreaCanvasN(void) const\r
-{\r
- return GetCore().GetClientAreaCanvasN();\r
-}\r
-\r
-FloatPoint\r
-_LiveboxPopupImpl::TranslateToClientAreaPosition(const FloatPoint& controlPosition) const
-{\r
- return GetCore().TranslateToClientAreaPosition(controlPosition);
-}\r
-\r
-FloatPoint
-_LiveboxPopupImpl::TranslateToControlPosition(const FloatPoint& clientPosition) const
-{
- return GetCore().TranslateToControlPosition(clientPosition);
-}
-
-}} // Tizen::Shell
+++ /dev/null
-//
-// 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 .cpp
- * @brief This is the implementation for the Livebox class.
- */
-
-#include <FBaseSysLog.h>
-#include <FShellLiveboxPopup.h>
-
-#include "FShell_LiveboxProviderManagerImpl.h"
-#include "FShell_LiveboxPopupProviderImpl.h"
-#include "FShell_LiveboxPopupImpl.h"
-
-namespace Tizen { namespace Shell
-{
-
-using namespace Tizen::Base;
-using namespace Tizen::Graphics;
-
-_LiveboxPopupProviderImpl::_LiveboxPopupProviderImpl(const String& instanceId, double x, double y)
- :__instanceId(instanceId)
- ,__pLiveboxPopup(null)
- ,__x(x)
- ,__y(y)
- ,__width(0)
- ,__height(0)
-{
-
-}
-
-_LiveboxPopupProviderImpl::~_LiveboxPopupProviderImpl()
-{
- delete __pLiveboxPopup;
-}
-
-const String&
-_LiveboxPopupProviderImpl::GetInstanceId() const
-{
- return __instanceId;
-}
-
-result
-_LiveboxPopupProviderImpl::SetLiveboxPopup(LiveboxPopup* pLiveboxPopup)
-{
- if( __pLiveboxPopup == pLiveboxPopup)
- {
- return E_SUCCESS;
- }
-
- __pLiveboxPopup = pLiveboxPopup;
-
- if( pLiveboxPopup == null)
- {
- return E_SUCCESS;
- }
-
- _LiveboxPopupImpl* pLiveboxPopupImpl = _LiveboxPopupImpl::GetInstance(*pLiveboxPopup);
- SysTryReturnResult(NID_APP, pLiveboxPopupImpl, E_INVALID_OPERATION, "Not-yet constructed! LiveboxPopup::Construct() should be called before use.");
-
- pLiveboxPopupImpl->SetAnchorPosition(FloatPoint(__x, __y));
- pLiveboxPopupImpl->SetProviderId(GetInstanceId());
-
- return E_SUCCESS;
-}
-
-LiveboxPopup*
-_LiveboxPopupProviderImpl::GetLiveboxPopup() const
-{
- return __pLiveboxPopup;
-}
-
-result
-_LiveboxPopupProviderImpl::RequestUpdateToLivebox()
-{
- return _LiveboxProviderManagerImpl::GetInstance()->RequestUpdateInstance(__instanceId);
-}
-
-}} // Tizen::Shell
+++ /dev/null
-//
-// 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_LiveboxPopupViewEvent.cpp
-* @brief This is the implementation for the _LiveboxPopupViewEvent class.
-*/
-
-#include <new>
-#include <FBaseErrors.h>
-#include <FBaseSysLog.h>
-#include "FShell_ILiveboxPopupViewEventListener.h"
-#include "FShell_LiveboxPopupViewEvent.h"
-
-using namespace Tizen::Base;
-using namespace Tizen::Base::Runtime;
-using namespace Tizen::Ui;
-
-namespace Tizen { namespace Shell
-{
-
-class _LiveboxPopupEventArg
- : public Object
- , public IEventArg
-{
-public:
- _LiveboxPopupEventArg(bool open);
- virtual ~_LiveboxPopupEventArg(void);
-
- bool IsOpened(void) const;
-
-private:
- bool __opened;
-
-}; // _LiveboxPopupEventArg
-
-_LiveboxPopupEventArg::_LiveboxPopupEventArg(bool open)
- : __opened(open)
-{
-}
-
-_LiveboxPopupEventArg::~_LiveboxPopupEventArg(void)
-{
-}
-
-bool
-_LiveboxPopupEventArg::IsOpened(void) const
-{
- return __opened;
-}
-
-_LiveboxPopupViewEvent::_LiveboxPopupViewEvent(const _Control& source)
- : __pSource(null)
-{
- result r = _Event::Initialize();
- SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pSource = &source;
- SetLastResult(E_SUCCESS);
-}
-
-_LiveboxPopupViewEvent::~_LiveboxPopupViewEvent(void)
-{
-}
-
-_LiveboxPopupViewEvent*
-_LiveboxPopupViewEvent::CreateInstanceN(const _Control& source)
-{
- _LiveboxPopupViewEvent* pLiveboxPopupEvent = new (std::nothrow) _LiveboxPopupViewEvent(source);
- SysTryReturn(NID_UI_CTRL, pLiveboxPopupEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
-
- return pLiveboxPopupEvent;
-}
-
-const _Control*
-_LiveboxPopupViewEvent::GetSource(void) const
-{
- return __pSource;
-}
-
-void
-_LiveboxPopupViewEvent::FireImpl(IEventListener& pListener, const IEventArg& arg)
-{
- _ILiveboxPopupViewEventListener* pLiveboxPopupViewEventListener = dynamic_cast<_ILiveboxPopupViewEventListener*>(&pListener);
- SysTryReturnVoidResult(NID_UI_CTRL, pLiveboxPopupViewEventListener, E_INVALID_ARG, "[E_INVALID_ARG] The invalid listener was given.\n");
-
- const _LiveboxPopupEventArg* pLiveboxPopupEventArg = dynamic_cast <const _LiveboxPopupEventArg*>(&arg);
- SysTryReturnVoidResult(NID_UI_CTRL, pLiveboxPopupEventArg, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given.\n");
-
- if ( pLiveboxPopupEventArg->IsOpened() )
- {
- pLiveboxPopupViewEventListener->OnLiveboxPopupViewOpened();
- }
- else
- {
- pLiveboxPopupViewEventListener->OnLiveboxPopupViewClosed();
- }
-}
-
-IEventArg*
-_LiveboxPopupViewEvent::CreateLiveboxPopupViewEventArgN(bool open)
-{
- _LiveboxPopupEventArg* pEventArg = new (std::nothrow) _LiveboxPopupEventArg(open);
- SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
-
- return pEventArg;
-}
-
-}} // Tizen::Shell
+++ /dev/null
-//
-// 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_LiveboxPopupViewPresenter.h
- * @brief This is the header file for the _LiveboxPopupViewPresenter class.
- *
- * This header file contains the declarations of the %_LiveboxPopupViewPresenter class.
- */
-#ifndef _FSHELL_INTERNAL_LIVEBOX_POPUP_VIEW_PRESENTER_H_
-#define _FSHELL_INTERNAL_LIVEBOX_POPUP_VIEW_PRESENTER_H_
-
-namespace Tizen { namespace Shell
-{
-
-class _LiveboxPopupView;
-
-class _LiveboxPopupViewPresenter
-{
-public:
- _LiveboxPopupViewPresenter(const _LiveboxPopupView& liveboxPopupView);
- virtual ~_LiveboxPopupViewPresenter(void);
-
- void Draw(void);
-
-private:
- _LiveboxPopupViewPresenter(const _LiveboxPopupViewPresenter& rhs);
- _LiveboxPopupViewPresenter& operator =(const _LiveboxPopupViewPresenter& rhs);
-
-private:
- _LiveboxPopupView* __pLiveboxPopupView;
-}; // _LiveboxPopupViewPresenter
-
-}} // Tizen::Shell
-
-#endif // _FSHELL_INTERNAL_LIVEBOX_POPUP_VIEW_PRESENTER_H_
+++ /dev/null
-//
-// 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_LiveboxProviderImpl.cpp
- * @brief This is the implementation for the _LiveboxProviderImpl class.
- */
-
-#include <FBase.h>
-#include <FShellLiveboxFrame.h>
-
-#include "FShell_LiveboxProviderImpl.h"
-#include "FShell_LiveboxFrameImpl.h"
-
-namespace Tizen { namespace Shell
-{
-
-using namespace Tizen::Base;
-
-_LiveboxProviderImpl::_LiveboxProviderImpl(const String& instanceId)
- :__instanceId(instanceId)
- ,__pLiveboxFrame(null)
-{
-
-}
-
-_LiveboxProviderImpl::~_LiveboxProviderImpl()
-{
- delete __pLiveboxFrame;
-}
-
-const String&
-_LiveboxProviderImpl::GetInstanceId() const
-{
- return __instanceId;
-}
-
-result
-_LiveboxProviderImpl::SetLiveboxFrame(LiveboxFrame* pLiveboxFrame)
-{
- if( __pLiveboxFrame == pLiveboxFrame)
- {
- return E_SUCCESS;
- }
-
- __pLiveboxFrame = pLiveboxFrame;
-
- if( pLiveboxFrame == null)
- {
- return E_SUCCESS;
- }
-
- _LiveboxFrameImpl* pLiveboxFrameImpl = _LiveboxFrameImpl::GetInstance(*pLiveboxFrame);
-// SysAssertf(pLiveboxFrameImpl != null, "Not-yet constructed! Construct() should be called before use.");
- SysTryReturnResult(NID_APP, pLiveboxFrameImpl, E_INVALID_OPERATION, "Not-yet constructed! LiveboxFrame::Construct() should be called before use.");
-
- result r = pLiveboxFrameImpl->SetProviderId(GetInstanceId());
- SysTryReturnResult(NID_APP, !IsFailed(r), E_SYSTEM, "Failed to invoke _LiveboxFrameImpl::SetProviderId.");
-
- return E_SUCCESS;
-}
-
-LiveboxFrame*
-_LiveboxProviderImpl::GetLiveboxFrame() const
-{
- return __pLiveboxFrame;
-}
-
-}} // Tizen::Shell
+++ /dev/null
-//
-// 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.
-//
-
-#include <new>
-#include <unique_ptr.h>
-#include <FBaseSysLog.h>
-#include <FBaseString.h>
-#include <FGrpPoint.h>
-#include "FShell_LiveboxViewImpl.h"
-
-using namespace std;
-using namespace Tizen::App;
-using namespace Tizen::Base;
-using namespace Tizen::Graphics;
-
-namespace Tizen { namespace Shell
-{
-
-const _LiveboxViewImpl*
-_LiveboxViewImpl::GetInstance(const LiveboxView& liveBoxView)
-{
- return static_cast<const _LiveboxViewImpl*>(_ControlImpl::GetInstance(liveBoxView));
-}
-
-_LiveboxViewImpl*
-_LiveboxViewImpl::GetInstance(LiveboxView& liveBoxView)
-{
- return static_cast<_LiveboxViewImpl*>(_ControlImpl::GetInstance(liveBoxView));
-}
-
-_LiveboxViewImpl*
-_LiveboxViewImpl::CreateLiveboxViewImplN(LiveboxView& liveBoxView)
-{
- unique_ptr<_LiveboxView> pCore(_LiveboxView::CreateLiveboxViewN());
- result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pCore, null, r, "[%s] Propagating.", GetErrorMessage(r));
-
- unique_ptr<_LiveboxViewImpl> pImpl(new (std::nothrow) _LiveboxViewImpl(&liveBoxView, pCore.get()));
- SysTryReturn(NID_UI_CTRL, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
-
- pCore.release();
-
- r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
-
- return pImpl.release();
-}
-
-_LiveboxViewImpl::_LiveboxViewImpl(LiveboxView* pPublic, _LiveboxView* pCore)
- : _ContainerImpl(pPublic, pCore)
-{
-}
-
-_LiveboxViewImpl::~_LiveboxViewImpl(void)
-{
-}
-
-const char*
-_LiveboxViewImpl::GetPublicClassName(void) const
-{
- return "Tizen::Shell::LiveboxView";
-}
-
-const LiveboxView&
-_LiveboxViewImpl::GetPublic(void) const
-{
- return static_cast<const LiveboxView&>(_ControlImpl::GetPublic());
-}
-
-LiveboxView&
-_LiveboxViewImpl::GetPublic(void)
-{
- return static_cast<LiveboxView&>(_ControlImpl::GetPublic());
-}
-
-const _LiveboxView&
-_LiveboxViewImpl::GetCore(void) const
-{
- return static_cast<const _LiveboxView&>(_ControlImpl::GetCore());
-}
-
-_LiveboxView&
-_LiveboxViewImpl::GetCore(void)
-{
- return static_cast<_LiveboxView&>(_ControlImpl::GetCore());
-}
-
-result
-_LiveboxViewImpl::Initialize(const AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::FloatRectangle& rect, const String& userInfo)
-{
- result r = GetCore().Initialize(appId, providerName, rect, userInfo);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- return r;
-}
-
-}} // Tizen::Shell
+++ /dev/null
-//
-// 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.
-//
-#ifndef _FSHELL_INTERNAL_LIVEBOX_VIEW_IMPL_H_
-#define _FSHELL_INTERNAL_LIVEBOX_VIEW_IMPL_H_
-
-#include <FAppTypes.h>
-#include <FShellLiveboxView.h>
-#include "FUi_ContainerImpl.h"
-#include "FShell_LiveboxView.h"
-
-namespace Tizen { namespace Base
-{
-class String;
-}}
-
-namespace Tizen { namespace Graphics
-{
-class Point;
-class FloatRectangle;
-}}
-
-namespace Tizen { namespace Shell
-{
-
-class _LiveboxViewImpl
- : public Tizen::Ui::_ContainerImpl
-{
-public:
- static _LiveboxViewImpl* CreateLiveboxViewImplN(LiveboxView& liveBoxView);
- static const _LiveboxViewImpl* GetInstance(const LiveboxView& liveBoxView);
- static _LiveboxViewImpl* GetInstance(LiveboxView& liveBoxView);
-
- virtual ~_LiveboxViewImpl(void);
-
- virtual const char* GetPublicClassName(void) const;
- virtual const LiveboxView& GetPublic(void) const;
- virtual LiveboxView& GetPublic(void);
- virtual const _LiveboxView& GetCore(void) const;
- virtual _LiveboxView& GetCore(void);
-
- result Initialize(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::FloatRectangle& rect, const Tizen::Base::String& userInfo);
-
-protected:
- _LiveboxViewImpl(LiveboxView* pPublic, _LiveboxView* pCore);
-
-private:
- _LiveboxViewImpl(const _LiveboxViewImpl& rhs);
- _LiveboxViewImpl& operator =(const _LiveboxViewImpl& rhs);
-}; // _LiveboxViewImpl
-
-}} // Tizen::Shell
-
-#endif // _FSHELL_INTERNAL_LIVEBOX_VIEW_IMPL_H_
+++ /dev/null
-//
-// 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_LiveboxViewManager.h
- * @brief This is the header file for the _LiveboxViewManager class.
- *
- * This header file contains the declarations of the %_LiveboxViewManager class.
- */
-#ifndef _FSHELL_INTERNAL_LIVEBOX_VIEW_MANAGER_H_
-#define _FSHELL_INTERNAL_LIVEBOX_VIEW_MANAGER_H_
-
-#include <unique_ptr.h>
-#include <FGrpBitmapCommon.h>
-#include <FMediaImageTypes.h>
-
-struct livebox;
-
-namespace Tizen { namespace Base
-{
-class String;
-}}
-
-namespace Tizen { namespace Base { namespace Collection
-{
-template<class KeyType, class ValueType> class HashMapT;
-}}}
-
-namespace Tizen { namespace Graphics
-{
-class Bitmap;
-class FloatDimension;
-class _ICoordinateSystemTransformer;
-}} // Tizen::Graphics
-
-namespace Tizen { namespace Shell
-{
-class _LiveboxView;
-
-/**
- * @class _LiveboxViewManager
- * @brief
- * @since 2.1
- */
-class _LiveboxViewManager
-{
-public:
- static _LiveboxViewManager* GetInstance(void);
- livebox* AddLiveboxView(_LiveboxView* pLiveboxView, const Tizen::Base::String& userInfo);
- void RemoveLiveboxView(_LiveboxView* pLiveboxView);
- _LiveboxView* GetLiveboxView(livebox* pLivebox) const;
- Tizen::Graphics::FloatDimension GetLiveboxSize(livebox* pLivebox) const;
- Tizen::Graphics::FloatDimension GetLiveboxPopupSize(livebox* pLivebox) const;
- void SetLiveboxSize(const _LiveboxView& liveboxView, const Tizen::Graphics::FloatDimension& size);
-
-private:
- _LiveboxViewManager(void);
- ~_LiveboxViewManager(void);
- _LiveboxViewManager(const _LiveboxViewManager& rhs);
- _LiveboxViewManager& operator =(const _LiveboxViewManager& rhs);
-
- int GetLiveboxSizeType(const Tizen::Graphics::FloatDimension& size) const;
- Tizen::Media::MediaPixelFormat GetPixelFormat(Tizen::Graphics::BitmapPixelFormat format) const;
- Tizen::Graphics::Bitmap* GetBitmapN(const Tizen::Base::String& fileName) const;
- Tizen::Graphics::Bitmap* GetBitmapN(void* pBuffer, const Tizen::Graphics::FloatDimension& size) const;
- bool IsGlMode(void) const;
-
- void OnLiveboxCreated(livebox* pLivebox);
- void OnLiveboxUpdated(livebox* pLivebox);
- void OnLiveboxDeleted(livebox* pLivebox);
- void OnLiveboxPinUpChanged(livebox* pLivebox);
- void OnLiveboxPopupUpdated(livebox* pLivebox);
-
- static int OnLiveboxEventReceived(livebox* pLivebox, livebox_event_type eventType, void* pData);
- static int OnLiveboxFaultReceived(livebox_fault_type faultType, const char* pAppId, const char* pFilename, const char *pFuncName, void* pData);
- static void OnLiveboxActivated(livebox* pLivebox, int ret, void* pData);
- static void OnLiveboxAdded(livebox* pLivebox, int ret, void* pData);
- static void OnLiveboxDeleted(livebox *pLivebox, int ret, void* pData);
- static void OnLiveboxResized(livebox* pLivebox, int ret, void* pData);
-
-private:
- struct _EventHandlerDeleter
- {
- typedef int pointer;
-
- void operator()(int)
- {
- livebox_unset_event_handler(OnLiveboxEventReceived);
- }
- };
-
- struct _FaultEventHandlerDeleter
- {
- typedef int pointer;
-
- void operator()(int)
- {
- livebox_unset_fault_handler(OnLiveboxFaultReceived);
- }
- };
-
- std::unique_ptr<Tizen::Base::Collection::HashMapT<livebox*, _LiveboxView*> > __pViewMap;
- std::unique_ptr<Tizen::Graphics::_ICoordinateSystemTransformer> __pCoordinateTransformer;
- std::unique_ptr<int, _EventHandlerDeleter> __eventHandler;
- std::unique_ptr<int, _FaultEventHandlerDeleter> __faultEventHandler;
- bool __glMode;
-};
-
-}} // Tizen::Shell
-
-#endif // _FSHELL_INTERNAL_LIVEBOX_VIEW_MANAGER_H_
+++ /dev/null
-//
-// 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_LiveboxViewModel.cpp
- * @brief This is the implementation file for the _LiveboxViewModel class.
- */
-
-#include <FBaseSysLog.h>
-#include <FShellLiveboxManager.h>
-#include <FShellLiveboxProviderInfo.h>
-#include <FBase_StringConverter.h>
-#include "FShell_LiveboxViewModel.h"
-
-using namespace std;
-using namespace Tizen::App;
-using namespace Tizen::Base;
-
-namespace Tizen { namespace Shell
-{
-
-_LiveboxViewModel::_LiveboxViewModel(void)
-{
-}
-
-_LiveboxViewModel::~_LiveboxViewModel(void)
-{
-}
-
-void
-_LiveboxViewModel::Initialize(const AppId& appId, const Tizen::Base::String& providerName)
-{
- __appId = appId;
- __providerName = providerName;
-
- // todo : _LiveboxManagerImpl::MakeProviderName
- if (providerName.IsEmpty())
- {
- __liveboxId = __appId;
- }
- else
- {
- if (appId.IsEmpty())
- {
- __liveboxId = providerName;
- }
- else
- {
- __liveboxId = appId + L"." + providerName;
- }
- }
-
- SysLog(NID_UI_CTRL, "(%ls %ls %ls)", __appId.GetPointer(), __providerName.GetPointer(), __liveboxId.GetPointer());
-
- LiveboxProviderInfo* pLiveboxProviderInfo = LiveboxManager::GetInstance()->GetLiveboxProviderInfoN(appId, providerName);
- SysTryReturnVoidResult(NID_UI_CTRL, pLiveboxProviderInfo, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
-
- __pLiveboxProviderInfo.reset(pLiveboxProviderInfo);
-
- SysLog(NID_UI_CTRL, "(%ls %ls)", __appId.GetPointer(), __providerName.GetPointer());
-
- SysLog(NID_UI_CTRL, "ProviderInfo(%ls %ls %ls %ls)", __pLiveboxProviderInfo->GetName().GetPointer(), __pLiveboxProviderInfo->GetDisplayName().GetPointer(),
- __pLiveboxProviderInfo->GetIconPath().GetPointer(), __pLiveboxProviderInfo->GetConfigurationAppControlAppId().GetPointer());
-
-}
-
-AppId
-_LiveboxViewModel::GetAppId(void) const
-{
- return __appId;
-}
-
-String
-_LiveboxViewModel::GetLiveboxId(void) const
-{
- return __liveboxId;
-}
-
-Tizen::Base::String
-_LiveboxViewModel::GetProviderName(void) const
-{
- return __providerName;
-}
-
-String
-_LiveboxViewModel::GetDisplayName(void) const
-{
- return __pLiveboxProviderInfo->GetDisplayName();
-}
-
-String
-_LiveboxViewModel::GetAppIconPath(void) const
-{
- return __pLiveboxProviderInfo->GetIconPath();
-}
-
-}} // Tizen::Shell
#include <new>
extern "C" {
+#include <minicontrol-type.h>
#include <minicontrol-provider.h>
}
#include <FGrpDimension.h>
#include "FUiAnim_RootVisualElement.h"
#include "FUiAnim_DisplayManager.h"
+#include "FUiCtrl_Slider.h"
+#include "FUiCtrl_TabBar.h"
+#include "FUiCtrl_ScrollPanel.h"
+
+
using namespace Tizen::Base;
using namespace Tizen::Graphics;
using namespace Tizen::Ui::Animations;
using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
namespace Tizen { namespace Shell{
_QuickPanelFrame::_QuickPanelFrame(void)
: __pQuickPanelFramePresenter(null)
, __pEventManager(null)
+ , __isFreeze(false)
+ , __isBubbled(false)
{
_UiEventManager* pEventManager = null;
return r;
}
+_UiTouchEventDelivery
+_QuickPanelFrame:: OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
+{
+ _Control* pTemp = dynamic_cast<_Control*>(const_cast<_Control*>(&source));
+ while(pTemp!=null)
+ {
+ _ScrollPanel* pScrollPanel = dynamic_cast<_ScrollPanel*>(pTemp);
+ // ScrollPanel exist
+ if(pScrollPanel != null)
+ {
+ __pMinicontrol = __pLayer->GetWindow();
+ minicontrol_request(__pMinicontrol, static_cast<minicontrol_request_e>(MINICONTROL_REQ_FREEZE_SCROLL_VIEWER));
+
+ __isFreeze = true;
+ return _UI_TOUCH_EVENT_DELIVERY_YES;
+ }
+ pTemp = pTemp->GetParent();
+ }
+
+ // Control is not on the ScrollPanel
+ _Slider* pSlider = dynamic_cast<_Slider*>(const_cast<_Control*>(&source));
+ _TabBar* pTabBar = dynamic_cast<_TabBar*>(const_cast<_Control*>(&source));
+
+ if(pSlider != null || pTabBar != null)
+ {
+ __pMinicontrol = __pLayer->GetWindow();
+ minicontrol_request(__pMinicontrol, static_cast<minicontrol_request_e>(MINICONTROL_REQ_FREEZE_SCROLL_VIEWER));
+
+ __isFreeze = true;
+ __isBubbled = true;
+ }
+
+ return _UI_TOUCH_EVENT_DELIVERY_YES;
+}
+
+ _UiTouchEventDelivery
+ _QuickPanelFrame::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo)
+ {
+ if(__isFreeze == true)
+ {
+ __pMinicontrol = __pLayer->GetWindow();
+ minicontrol_request(__pMinicontrol, static_cast<minicontrol_request_e>(MINICONTROL_REQ_UNFREEZE_SCROLL_VIEWER));
+
+ __isFreeze = false;
+ }
+
+ if(__isBubbled == true)
+ {
+ __isBubbled = false;
+ }
+
+ return _UI_TOUCH_EVENT_DELIVERY_YES;
+}
+
+bool
+_QuickPanelFrame::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo)
+{
+ if(__isBubbled == true)
+ {
+ if(__isFreeze == true)
+ {
+ __pMinicontrol = __pLayer->GetWindow();
+ minicontrol_request(__pMinicontrol, static_cast<minicontrol_request_e>(MINICONTROL_REQ_UNFREEZE_SCROLL_VIEWER));
+
+ __isFreeze = false;
+ }
+ __isBubbled = false;
+ }
+ return true;
+}
+
+bool
+_QuickPanelFrame::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo)
+{
+ if(__isFreeze == true)
+ {
+ __pMinicontrol = __pLayer->GetWindow();
+ minicontrol_request(__pMinicontrol, static_cast<minicontrol_request_e>(MINICONTROL_REQ_UNFREEZE_SCROLL_VIEWER));
+
+ __isFreeze = false;
+ }
+ if(__isBubbled == true)
+ {
+ __isBubbled = false;
+ }
+}
+
void
_QuickPanelFrame::OnDraw(void)
{
//
/**
- * @file FShellLiveboxManager.cpp
+ * @file FShellAppWidgetManager.cpp
* @brief This is the implementation for the LockManager class.
*/
#include <FBaseSysLog.h>
#include <FApp.h>
-
#include <FShellNotificationManager.h>
#include <FShellNotificationRequest.h>
#include <FShellIBadgeEventListener.h>
// _NotificationManagerImpl
///////////////////////////////////////////////////////////////////
_NotificationManagerImpl::_NotificationManagerImpl(void)
- : __notifyPrivitId(-1)
- , __notifyPrivitIdForOngoing(-1)
+ : __notifyPrivateId(-1)
+ , __notifyPrivateIdForOngoing(-1)
{
}
const String& iconPath = notifyRequest.GetIconFilePath();
const String& soundPath = notifyRequest.GetSoundFilePath();
const notification_type_e notiType = isOngoing ? NOTIFICATION_TYPE_ONGOING : NOTIFICATION_TYPE_NOTI;
- int notiPrivateId = isOngoing ? __notifyPrivitIdForOngoing : __notifyPrivitId;
+ int notiPrivateId = isOngoing ? __notifyPrivateIdForOngoing : __notifyPrivateId;
notification_h notiHandle = null;
bundle* pBundle = null;
bool needUpdate = false;
case ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE:
if (needUpdate)
{
+ ConvertNotificationResult(notification_update_size(notiHandle, notiPrivateId, 0)); // Reset for override BYTE type
r = ConvertNotificationResult(notification_update_progress(notiHandle, notiPrivateId, progress/100.));
}
else
case ONGOING_ACTIVITY_TYPE_PROGRESS_BYTE:
if (needUpdate)
{
+ ConvertNotificationResult(notification_update_progress(notiHandle, notiPrivateId, 0.0)); // Reset for override PERCENTAGE type
r = ConvertNotificationResult(notification_update_size(notiHandle, notiPrivateId, progress));
}
else
break;
case ONGOING_ACTIVITY_TYPE_TEXT:
- // Do nothing
+ ConvertNotificationResult(notification_update_progress(notiHandle, notiPrivateId, 0.0)); // Reset the progress
+ ConvertNotificationResult(notification_update_size(notiHandle, notiPrivateId, 0));
break;
default:
SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification post failure.", GetErrorMessage(r));
if (isOngoing)
{
- __notifyPrivitIdForOngoing = notiPrivateId;
+ __notifyPrivateIdForOngoing = notiPrivateId;
}
else
{
- __notifyPrivitId = notiPrivateId;
+ __notifyPrivateId = notiPrivateId;
}
}
result r = E_SUCCESS;
notification_error_e err = NOTIFICATION_ERROR_NONE;
const notification_type_e notiType = onGoing ? NOTIFICATION_TYPE_ONGOING : NOTIFICATION_TYPE_NOTI;
- const int notiPrivateId = onGoing ? __notifyPrivitIdForOngoing : __notifyPrivitId;
+ const int notiPrivateId = onGoing ? __notifyPrivateIdForOngoing : __notifyPrivateId;
if (notiPrivateId != -1)
{
std::unique_ptr<char[]> pAppId(_StringConverter::CopyToCharArrayN(appId));
const notification_type_e notiType = onGoing ? NOTIFICATION_TYPE_ONGOING : NOTIFICATION_TYPE_NOTI;
- const int notiPrivateId = onGoing ? __notifyPrivitIdForOngoing : __notifyPrivitId;
+ const int notiPrivateId = onGoing ? __notifyPrivateIdForOngoing : __notifyPrivateId;
if (notiPrivateId != -1)
{
using namespace Tizen::Base::Collection;
using namespace Tizen::App;
-request_cb_t __pLiveboxRequestHandlerCallback = null;
+request_cb_t __pAppWidgetRequestHandlerCallback = null;
_ShortcutManagerImpl::_ShortcutManagerImpl()
{
if( __pShortcutManagerImpl == null)
{
__pShortcutManagerImpl = new (std::nothrow)_ShortcutManagerImpl;
- SysTryReturn(NID_APP, __pShortcutManagerImpl, null, E_OUT_OF_MEMORY, "Allocating new _LiveboxManagerProxy failed.");
+ SysTryReturn(NID_APP, __pShortcutManagerImpl, null, E_OUT_OF_MEMORY, "Allocating new _AppWidgetManagerProxy failed.");
result r = __pShortcutManagerImpl->Construct();
SysTryReturn(NID_APP, !IsFailed(r), null, r, "[%s] Propagating.", GetErrorMessage(r));
}
else
{
- if( __pLiveboxRequestHandlerCallback != null)
+ if( __pAppWidgetRequestHandlerCallback != null)
{
- SysLog(NID_APP, "Invoking livebox request handler.");
- __pLiveboxRequestHandlerCallback(appId, text, type, content_info, icon, pid, period, data);
+ SysLog(NID_APP, "Invoking appwidget request handler.");
+ __pAppWidgetRequestHandlerCallback(appId, text, type, content_info, icon, pid, period, data);
}
}
}
void
-_ShortcutManagerImpl::SetLiveboxRequestHandlerCallback(request_cb_t pLiveboxRequestHandlerFn)
+_ShortcutManagerImpl::SetAppWidgetRequestHandlerCallback(request_cb_t pAppWidgetRequestHandlerFn)
{
- __pLiveboxRequestHandlerCallback = pLiveboxRequestHandlerFn;
+ __pAppWidgetRequestHandlerCallback = pAppWidgetRequestHandlerFn;
}
//
/**
- * @file FShell_LiveboxManagerImpl.h
- * @brief This is the header file for the _LiveboxManagerImpl class.
+ * @file FShell_AppWidgetManagerImpl.h
+ * @brief This is the header file for the _AppWidgetManagerImpl class.
*
- * This header file contains the declarations of the _LiveboxManagerImpl class.
+ * This header file contains the declarations of the _AppWidgetManagerImpl class.
*/
-#ifndef _FSHELL_INTERNAL_LIVEBOX_MANAGERIMPL_H_
-#define _FSHELL_INTERNAL_LIVEBOX_MANAGERIMPL_H_
+#ifndef _FSHELL_INTERNAL_APPWIDGET_MANAGERIMPL_H_
+#define _FSHELL_INTERNAL_APPWIDGET_MANAGERIMPL_H_
#include <unique_ptr.h>
#include <FBaseObject.h>
#include <FBaseColIListT.h>
#include <FAppTypes.h>
#include <FAppIAppControlProviderEventListener.h>
-#include <FShellLiveboxManager.h>
+#include <FShellAppWidgetManager.h>
namespace Tizen { namespace Shell {
-class LiveboxProviderInfo;
+class AppWidgetProviderInfo;
-class _OSP_EXPORT_ _LiveboxManagerImpl
+class _OSP_EXPORT_ _AppWidgetManagerImpl
: public Tizen::Base::Object
{
public:
- static _LiveboxManagerImpl* GetInstance();
+ static _AppWidgetManagerImpl* GetInstance();
// API impl
- Tizen::Base::Collection::IList* GetLiveboxProviderInfoListN();
- LiveboxProviderInfo* GetLiveboxProviderInfoN(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName);
- LiveboxProviderInfo* GetDefaultLiveboxProviderInfoN(const Tizen::App::PackageId& packageId);
- result SetLiveboxAddRequestListener(ILiveboxAddRequestListener* pListener);
+ Tizen::Base::Collection::IList* GetAppWidgetProviderInfoListN();
+ AppWidgetProviderInfo* GetAppWidgetProviderInfoN(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName);
+ AppWidgetProviderInfo* GetDefaultAppWidgetProviderInfoN(const Tizen::App::PackageId& packageId);
+ result SetAppWidgetAddRequestListener(IAppWidgetAddRequestListener* pListener);
// internal
- ILiveboxAddRequestListener* GetAddRequestListener();
- static bool IsLiveboxProviderDefault(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName);// temp
+ IAppWidgetAddRequestListener* GetAddRequestListener();
+ static bool IsAppWidgetProviderDefault(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName);// temp
// helper
static result ExtractAppIdAndProviderName(const Tizen::Base::String& providerId, Tizen::App::AppId& appId, Tizen::Base::String& providerName);
static Tizen::Base::String MakeProviderName(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName);
private:
- _LiveboxManagerImpl();
- virtual ~_LiveboxManagerImpl();
+ _AppWidgetManagerImpl();
+ virtual ~_AppWidgetManagerImpl();
result Construct();
private:
- ILiveboxAddRequestListener* __pLiveboxRequestEventListener;
+ IAppWidgetAddRequestListener* __pAppWidgetRequestEventListener;
};
}} // Tizen::Shell
-#endif /* _FSHELL_INTERNAL_LIVEBOX_MANAGERIMPL_H_ */
+#endif /* _FSHELL_INTERNAL_APPWIDGET_MANAGERIMPL_H_ */
--- /dev/null
+//
+// 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_AppWidgetManagerIpcMessage.h
+ * @brief This is the header file for the AppWidgetManagerService Ipc message types.
+ */
+
+#include <FAppTypes.h>
+#include <FSystem.h>
+
+#include "ipc/ipc_message_macros.h"
+#include "FIo_IpcCommonParamTraits.h"
+#include "FIo_IpcMessageStart.h"
+
+
+#define IPC_MESSAGE_START LiveboxManagerServiceStart
+
+// Message to service
+IPC_SYNC_MESSAGE_CONTROL3_1(AppWidgetManager_RequestUpdate, Tizen::Base::String, Tizen::Base::String, Tizen::Base::String, result)
+IPC_SYNC_MESSAGE_CONTROL2_1(AppWidgetManager_RequestUpdateInstance, Tizen::Base::String, Tizen::Base::String, result)
+
+IPC_SYNC_MESSAGE_CONTROL3_1(AppWidgetManager_RequestSharedMemoryId, Tizen::Base::String, int, int, int)
+IPC_SYNC_MESSAGE_CONTROL3_1(AppWidgetManager_RequestSharedMemoryIdForPD, Tizen::Base::String, int, int, int)
+IPC_SYNC_MESSAGE_CONTROL3_1(AppWidgetManager_RequestSyncSharedMemory, Tizen::Base::String, int, int, result)
+IPC_SYNC_MESSAGE_CONTROL1_1(AppWidgetManager_RequestSyncSharedMemoryForPD, Tizen::Base::String, result)
+IPC_SYNC_MESSAGE_CONTROL1_1(AppWidgetManager_RequestReleaseSharedMemory, Tizen::Base::String, result)
+IPC_SYNC_MESSAGE_CONTROL1_1(AppWidgetManager_RequestReleaseSharedMemoryForPD, Tizen::Base::String, result)
+
+// Message from service
+IPC_MESSAGE_CONTROL5(AppWidgetManager_SendTouchEvent, Tizen::Base::String, int, double, double, double)
+IPC_MESSAGE_CONTROL5(AppWidgetManager_SendTouchEventForPD, Tizen::Base::String, int, double, double, double)
// limitations under the License.
//
/**
- * @file FShell_LiveboxManagerProxy.h
- * @brief This is the header file for the _LiveboxManagerProxy class.
+ * @file FShell_AppWidgetManagerProxy.h
+ * @brief This is the header file for the _AppWidgetManagerProxy class.
*
- * This header file contains the declarations of the _LiveboxManagerProxy class.
+ * This header file contains the declarations of the _AppWidgetManagerProxy class.
*/
-#ifndef _FSHELL_LIVEBOXMANAGERPROXY_H_
-#define _FSHELL_LIVEBOXMANAGERPROXY_H_
+#ifndef _FSHELL_APPWIDGET_MANAGER_PROXY_H_
+#define _FSHELL_APPWIDGET_MANAGER_PROXY_H_
#include <FBaseObject.h>
#include <FIo_IIpcClientEventListener.h>
namespace Tizen { namespace Shell {
-class _LiveboxManagerProxy
+class _AppWidgetManagerProxy
: public Tizen::Io::_IIpcClientEventListener
, public Tizen::Base::Object
{
public:
- _LiveboxManagerProxy();
- virtual ~_LiveboxManagerProxy();
+ _AppWidgetManagerProxy();
+ virtual ~_AppWidgetManagerProxy();
- static _LiveboxManagerProxy* GetInstance();
+ static _AppWidgetManagerProxy* GetInstance();
result Construct(void);
result RequestUpdate(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Base::String& argument);
}} // Tizen::Shell
-#endif /* _FSHELL_LIVEBOXMANAGERPROXY_H_ */
+#endif /* _FSHELL_APPWIDGET_MANAGER_PROXY_H_ */
--- /dev/null
+//
+// 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_AppWidgetPopupProviderImpl.h
+ * @brief This is the header file for the _AppWidgetPopupProviderImpl class.
+ *
+ * This header file contains the declarations of the %_AppWidgetPopupProviderImpl class.
+ */
+
+#ifndef _FSHELL_INTERNAL_APPWIDGET_POPUP_PROVIDER_IMPL_H_
+#define _FSHELL_INTERNAL_APPWIDGET_POPUP_PROVIDER_IMPL_H_
+
+#include <FBaseObject.h>
+#include <FBaseString.h>
+
+namespace Tizen { namespace Shell
+{
+
+class AppWidgetPopup;
+
+class _OSP_EXPORT_ _AppWidgetPopupProviderImpl
+: public Tizen::Base::Object
+{
+public:
+ _AppWidgetPopupProviderImpl(const Tizen::Base::String& instanceId, double x, double y);
+ virtual ~_AppWidgetPopupProviderImpl();
+
+ const Tizen::Base::String& GetInstanceId() const;
+ result SetAppWidgetPopup(Tizen::Shell::AppWidgetPopup* pAppWidgetPopup);
+ Tizen::Shell::AppWidgetPopup* GetAppWidgetPopup() const;
+ result RequestUpdateToAppWidget();
+
+private:
+ _AppWidgetPopupProviderImpl();
+ _AppWidgetPopupProviderImpl(const _AppWidgetPopupProviderImpl& rhs);
+ _AppWidgetPopupProviderImpl& operator =(const _AppWidgetPopupProviderImpl& rhs);
+
+private:
+ Tizen::Base::String __instanceId;
+ AppWidgetPopup* __pAppWidgetPopup;
+ double __x;
+ double __y;
+ int __width;
+ int __height;
+};
+
+} /* namespace AppWidget */
+}
+#endif /* _FSHELL_INTERNAL_APPWIDGET_POPUP_PROVIDER_IMPL_H_ */
//
/**
- * @file FShell_LiveboxProviderImpl.h
- * @brief This is the header file for the _LiveboxProviderImpl class.
+ * @file FShell_AppWidgetProviderImpl.h
+ * @brief This is the header file for the _AppWidgetProviderImpl class.
*
- * This header file contains the declarations of the _LiveboxProviderImpl class.
+ * This header file contains the declarations of the _AppWidgetProviderImpl class.
*/
-#ifndef _FSHELL_LIVEBOXPROVIDER_IMPL_H_
-#define _FSHELL_LIVEBOXPROVIDER_IMPL_H_
+#ifndef _FSHELL_APPWIDGET_PROVIDER_IMPL_H_
+#define _FSHELL_APPWIDGET_PROVIDER_IMPL_H_
#include <FBaseObject.h>
#include <FBaseString.h>
namespace Tizen { namespace Shell
{
-class LiveboxFrame;
+class AppWidgetFrame;
-class _LiveboxProviderImpl
+class _AppWidgetProviderImpl
: public Tizen::Base::Object
{
public:
- _LiveboxProviderImpl(const Tizen::Base::String& instanceId);
- virtual ~_LiveboxProviderImpl();
+ _AppWidgetProviderImpl(const Tizen::Base::String& instanceId);
+ virtual ~_AppWidgetProviderImpl();
const Tizen::Base::String& GetInstanceId() const;
- result SetLiveboxFrame(LiveboxFrame* pLiveboxFrame);
- LiveboxFrame* GetLiveboxFrame() const;
+ result SetAppWidgetFrame(AppWidgetFrame* pAppWidgetFrame);
+ AppWidgetFrame* GetAppWidgetFrame() const;
private:
Tizen::Base::String __instanceId;
- LiveboxFrame* __pLiveboxFrame;
+ AppWidgetFrame* __pAppWidgetFrame;
};
}} // Tizen::Shell
-#endif /* _FSHELL_LIVEBOXPROVIDER_IMPL_H_ */
+#endif /* _FSHELL_APPWIDGET_PROVIDER_IMPL_H_ */
//
/**
- * @file FShell_LiveboxProviderInfoImpl.h
- * @brief This is the header file for the _LiveboxInfoImpl class.
+ * @file FShell_AppWidgetProviderInfoImpl.h
+ * @brief This is the header file for the _AppWidgetInfoImpl class.
*
- * This header file contains the declarations of the _LiveboxInfoImpl class.
+ * This header file contains the declarations of the _AppWidgetInfoImpl class.
*/
-#ifndef _FSHELL_INTERNAL_LIVEBOX_PROVIDER_INFO_IMPL_H_
-#define _FSHELL_INTERNAL_LIVEBOX_PROVIDER_INFO_IMPL_H_
+#ifndef _FSHELL_INTERNAL_APPWIDGET_PROVIDER_INFO_IMPL_H_
+#define _FSHELL_INTERNAL_APPWIDGET_PROVIDER_INFO_IMPL_H_
#include <FBaseCol.h>
#include <FAppTypes.h>
namespace Tizen { namespace Shell {
-class _OSP_EXPORT_ _LiveboxProviderInfoImpl
+class _OSP_EXPORT_ _AppWidgetProviderInfoImpl
: public Tizen::Base::Object
{
public:
/**
- * This is the constructor that initializes an instance of %LiveboxProviderInfo with the specified values.
+ * This is the constructor that initializes an instance of %AppWidgetProviderInfo with the specified values.
*
* @since 2.1
*/
- _LiveboxProviderInfoImpl(const Tizen::App::AppId& appId, const Tizen::Base::String& name);
+ _AppWidgetProviderInfoImpl(const Tizen::App::AppId& appId, const Tizen::Base::String& name);
/**
* This destructor overrides Tizen::Base::Object::~Object().
*
* @since 2.1
*/
- virtual ~_LiveboxProviderInfoImpl();
+ virtual ~_AppWidgetProviderInfoImpl();
/**
* Gets the application ID.
Tizen::App::AppId GetAppId() const;
/**
- * Gets the Livebox provider name
+ * Gets the AppWidget provider name
*
* @since 2.1
*
/**
* Gets the display name of the Livbox @n
* If the system language setting is changed, this method returns the localized application name.
- * The display name is displayed in applications that showing Livebox like Launcher, and so on.
+ * The display name is displayed in applications that showing AppWidget like Launcher, and so on.
*
* @since 2.1
*
bool IsDefault() const;
/**
- * Gets a list of LiveboxSizeInfo of the Livebox
+ * Gets a list of AppWidgetSizeInfo of the AppWidget
*
* @since 2.1
*
- * @return A pointer to the array list that contains all LiveboxSizeInfo of the LiveboxProvider@n
+ * @return A pointer to the array list that contains all AppWidgetSizeInfo of the AppWidgetProvider@n
* else @c null if an error occurs
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
// internal
- static LiveboxProviderInfo* GetLiveboxProviderInfoN(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName);
- static LiveboxProviderInfo* GetLiveboxProviderInfoN(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, bool isDefault);
+ static AppWidgetProviderInfo* GetAppWidgetProviderInfoN(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName);
+ static AppWidgetProviderInfo* GetAppWidgetProviderInfoN(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, bool isDefault);
- static _LiveboxProviderInfoImpl* GetImpl(const LiveboxProviderInfo& liveboxProviderInfo);
+ static _AppWidgetProviderInfoImpl* GetImpl(const AppWidgetProviderInfo& appwidgetProviderInfo);
private:
/**
*
* @since 2.1
*/
- _LiveboxProviderInfoImpl();
+ _AppWidgetProviderInfoImpl();
/**
- * This is the copy constructor for the %LiveboxProviderInfo class.
+ * This is the copy constructor for the %AppWidgetProviderInfo class.
*
* @since 2.1
*
- * @param[in] value An instance of %LiveboxProviderInfo
+ * @param[in] value An instance of %AppWidgetProviderInfo
*/
- _LiveboxProviderInfoImpl(const _LiveboxProviderInfoImpl& rhs);
+ _AppWidgetProviderInfoImpl(const _AppWidgetProviderInfoImpl& rhs);
/**
- * Assigns the value of the specified instance of %LiveboxProviderInfo to the current instance of %LiveboxProviderInfo.
+ * Assigns the value of the specified instance of %AppWidgetProviderInfo to the current instance of %AppWidgetProviderInfo.
*
* @since 2.1
*
- * @param[in] rhs An instance of %LiveboxProviderInfo
+ * @param[in] rhs An instance of %AppWidgetProviderInfo
*/
- _LiveboxProviderInfoImpl& operator =(const _LiveboxProviderInfoImpl& rhs);
+ _AppWidgetProviderInfoImpl& operator =(const _AppWidgetProviderInfoImpl& rhs);
private:
Tizen::Base::String __appId;
// Tizen::Base::String __iconPath;
Tizen::Base::Collection::ArrayList __sizeInfos;
- friend class LiveboxProviderInfo;
-// friend class _LiveboxManagerImpl;
+ friend class AppWidgetProviderInfo;
+// friend class _AppWidgetManagerImpl;
};
}} // Tizen::Shell
-#endif // _FSHELL_INTERNAL_LIVEBOX_PROVIDER_INFO_IMPL_H_
+#endif // _FSHELL_INTERNAL_APPWIDGET_PROVIDER_INFO_IMPL_H_
--- /dev/null
+//
+// 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_AppWidgetManagerImpl.h
+ * @brief This is the header file for the _AppWidgetProviderManagerImpl class.
+ *
+ * This header file contains the declarations of the _AppWidgetProviderManagerImpl class.
+ */
+
+#ifndef FShell_APPWIDGET_PROVIDER_MANAGERIMPL_H_
+#define FShell_APPWIDGET_PROVIDER_MANAGERIMPL_H_
+
+#include <unique_ptr.h>
+#include <FBaseObject.h>
+#include <FBaseColHashMapT.h>
+#include <FBaseColIMap.h>
+#include <FAppTypes.h>
+#include <FAppIAppControlProviderEventListener.h>
+
+
+namespace Tizen { namespace Shell {
+
+class AppWidgetFrame;
+class AppWidgetPopup;
+
+class IAppWidgetProviderFactory;
+class IAppWidgetPopupProviderFactory;
+class AppWidgetProvider;
+class AppWidgetPopupProvider;
+class _IAppWidgetTouchEventListener;
+class _AppWidgetManagerProxy;
+
+
+class _OSP_EXPORT_ _AppWidgetProviderManagerImpl
+ : public Tizen::App::IAppControlProviderEventListener
+ , public Tizen::Base::Object
+{
+public:
+ static _AppWidgetProviderManagerImpl* GetInstance();
+
+ // public APIs
+ result SetAppWidgetProviderFactory(IAppWidgetProviderFactory& factory);
+ result SetAppWidgetPopupProviderFactory(IAppWidgetPopupProviderFactory& factory);
+ result RequestUpdate(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Base::String& argument);
+ result AddAppWidget(const Tizen::App::AppId& providerAppId, const Tizen::Base::String& providerName, const Tizen::Base::String& text, const Tizen::Base::String& userInfo);
+
+ // internal APIs
+ result RequestUpdateInstance(const Tizen::Base::String& instanceId, const Tizen::Base::String& argument = L"");
+
+ result RequestSharedMemoryId(const Tizen::Base::String& instanceId, int width, int height, int& shmId);
+ result RequestSharedMemoryIdForPD(const Tizen::Base::String& instanceId, int width, int height, int& shmId);
+ result RequestSyncSharedMemory(const Tizen::Base::String& instanceId, int width, int height);
+ result RequestSyncSharedMemoryForPD(const Tizen::Base::String& instanceId);
+ result RequestReleaseSharedMemory(const Tizen::Base::String& instanceId);
+ result RequestReleaseSharedMemoryForPD(const Tizen::Base::String& instanceId);
+
+ // internal
+ result SetAppWidgetTouchEventListener(const Tizen::Base::String& instanceId, _IAppWidgetTouchEventListener& listener);
+ result SetAppWidgetPopupEventListener(_IAppWidgetTouchEventListener& listener);
+
+ result ForwardTouchEvent(const Tizen::Base::String& instanceId, int eventType, double timeStamp, double x, double y);
+ result ForwardTouchEventForPD(const Tizen::Base::String& instanceId, int eventType, double timeStamp, double x, double y);
+
+ // helper
+// static result ExtractAppIdAndProviderName(const Tizen::Base::String& providerId, Tizen::App::AppId& appId, Tizen::Base::String& providerName);
+ result ValidateApplicationAttributeForAppWidget(void);
+
+ void TerminateAppIfInvalidState();
+
+private:
+ _AppWidgetProviderManagerImpl();
+ virtual ~_AppWidgetProviderManagerImpl();
+ result Construct();
+
+ result CreateAppWidget(const Tizen::Base::String& name, const Tizen::Base::String& instanceId, int width, int height, const Tizen::Base::String& userInfo);
+ result UpdateAppWidget(const Tizen::Base::String& instanceId, int width, int height, const Tizen::Base::String& argument);
+ result ResizeAppWidget(const Tizen::Base::String& instanceId, int width, int height);
+ result RemoveAppWidget(const Tizen::Base::String& instanceId, bool terminateIfFinished);
+ result CreateAppWidgetPopupProvider(const Tizen::Base::String& instanceId, const Tizen::Base::String& providerName, const Tizen::Base::String& userInfo, double x, double y, int width, int height);
+ result DestroyAppWidgetPopupProvider(const Tizen::Base::String& instanceId);
+
+ bool ContainsAppWidget(const Tizen::Base::String& instanceId) const;
+
+ virtual void OnAppControlRequestReceived(RequestId reqId, const Tizen::Base::String& operationId, const Tizen::Base::String* pUriData, const Tizen::Base::String* pMimeType, const Tizen::Base::Collection::IMap* pExtraData);
+
+ result HandleAppWidgetRequest(const Tizen::Base::String& operationId, const Tizen::Base::Collection::IMap* pArgs);
+ result HandleAppWidgetPopupRequest(const Tizen::Base::String& operationId, const Tizen::Base::Collection::IMap* pArgs);
+
+private:
+ // for AppWidget
+ IAppWidgetProviderFactory* __pAppWidgetFactory;
+ Tizen::Base::Collection::HashMapT<Tizen::Base::String, AppWidgetProvider*> __appwidgetProviders;
+ Tizen::Base::Collection::HashMapT<Tizen::Base::String, _IAppWidgetTouchEventListener*> __touchEventListeners;
+
+ // for AppWidgetPopup
+ IAppWidgetPopupProviderFactory* __pAppWidgetPopupProviderFactory;
+ AppWidgetPopupProvider* __pAppWidgetPopupProvider;
+ _IAppWidgetTouchEventListener* __AppWidgetPopupTouchEventListener;
+
+// bool __messageReceived;
+};
+
+}} // Tizen::Shell
+#endif /* FShell_APPWIDGET_PROVIDER_MANAGERIMPL_H_ */
//
/**
- * @file FShell_LiveboxSizeInfoImpl.h
- * @brief This is the header file for the %_LiveboxSizeInfoImpl class.
+ * @file FShell_AppWidgetSizeInfoImpl.h
+ * @brief This is the header file for the %_AppWidgetSizeInfoImpl class.
*
- * This header file contains the declarations of the %_LiveboxSizeInfoImpl class.
+ * This header file contains the declarations of the %_AppWidgetSizeInfoImpl class.
*/
-#ifndef _FSHELL_LIVEBOX_SIZE_INFO_IMPL_H_
-#define _FSHELL_LIVEBOX_SIZE_INFO_IMPL_H_
+#ifndef _FSHELL_APPWIDGET_SIZE_INFO_IMPL_H_
+#define _FSHELL_APPWIDGET_SIZE_INFO_IMPL_H_
#include <FBaseString.h>
#include <FBaseCol.h>
namespace Tizen { namespace Shell
{
-class LiveboxSizeInfo;
+class AppWidgetSizeInfo;
/**
- * @class _LiveboxSizeInfoImpl
+ * @class _AppWidgetSizeInfoImpl
* @brief This class contains size and preview image path for the size
*
* @since 2.1
*/
-class _OSP_EXPORT_ _LiveboxSizeInfoImpl
+class _OSP_EXPORT_ _AppWidgetSizeInfoImpl
: public Tizen::Base::Object
{
public:
*
* @since 2.1
*/
- virtual ~_LiveboxSizeInfoImpl();
+ virtual ~_AppWidgetSizeInfoImpl();
/**
- * This is the copy constructor for the %LiveboxSizeInfo class.
+ * This is the copy constructor for the %AppWidgetSizeInfo class.
*
* @since 2.1
*
- * @param[in] rhs An instance of %LiveboxSizeInfo
+ * @param[in] rhs An instance of %AppWidgetSizeInfo
*/
- _LiveboxSizeInfoImpl(const _LiveboxSizeInfoImpl& rhs);
+ _AppWidgetSizeInfoImpl(const _AppWidgetSizeInfoImpl& rhs);
/**
- * Assigns the value of the specified instance of %LiveboxSizeInfo to the current instance of %LiveboxSizeInfo.
+ * Assigns the value of the specified instance of %AppWidgetSizeInfo to the current instance of %AppWidgetSizeInfo.
*
* @since 2.1
*
- * @param[in] rhs An instance of %LiveboxSizeInfo
+ * @param[in] rhs An instance of %AppWidgetSizeInfo
*/
- _LiveboxSizeInfoImpl& operator =(const _LiveboxSizeInfoImpl& rhs);
+ _AppWidgetSizeInfoImpl& operator =(const _AppWidgetSizeInfoImpl& rhs);
/**
* Gets the size
*/
Tizen::Base::String GetPreviewImagePath() const;
- static LiveboxSizeInfo* CreateLiveboxSizeInfo(Tizen::Graphics::FloatDimension size, const Tizen::Base::String& previewImagePath);
+ static AppWidgetSizeInfo* CreateAppWidgetSizeInfo(Tizen::Graphics::FloatDimension size, const Tizen::Base::String& previewImagePath);
private:
/**
*
* @since 2.1
*/
- _LiveboxSizeInfoImpl();
+ _AppWidgetSizeInfoImpl();
/**
- * This is the constructor that initializes an instance of %_LiveboxSizeInfoImpl with the specified values.
+ * This is the constructor that initializes an instance of %_AppWidgetSizeInfoImpl with the specified values.
*
* @since 2.1
*/
- _LiveboxSizeInfoImpl(Tizen::Graphics::FloatDimension size, const Tizen::Base::String& previewImagePath);
+ _AppWidgetSizeInfoImpl(Tizen::Graphics::FloatDimension size, const Tizen::Base::String& previewImagePath);
private:
Tizen::Graphics::FloatDimension __size;
Tizen::Base::String __previewImagePath;
-friend class LiveboxSizeInfo;
+friend class AppWidgetSizeInfo;
};
}} // Tizen::Shell
-#endif /* _FSHELL_LIVEBOX_SIZE_INFO_IMPL_H_ */
+#endif /* _FSHELL_APPWIDGET_SIZE_INFO_IMPL_H_ */
//
/**
- * @file FShell_ILiveboxTouchEventListener.h
- * @brief This is the header file for the _ILiveboxTouchEventListener interface.
+ * @file FShell_IAppWidgetTouchEventListener.h
+ * @brief This is the header file for the _IAppWidgetTouchEventListener interface.
*
- * This header file contains the declarations of the _ILiveboxTouchEventListener interface.
+ * This header file contains the declarations of the _IAppWidgetTouchEventListener interface.
*/
-#ifndef _FSHELL_ILIVEBOX_TOUCH_EVENT_LISTENER_H_
-#define _FSHELL_ILIVEBOX_TOUCH_EVENT_LISTENER_H_
+#ifndef _FSHELL_IAPPWIDGET_TOUCH_EVENT_LISTENER_H_
+#define _FSHELL_IAPPWIDGET_TOUCH_EVENT_LISTENER_H_
#include <FBaseRtIEventListener.h>
namespace Tizen { namespace Shell
{
-class _ILiveboxTouchEventListener
+class _IAppWidgetTouchEventListener
: public Tizen::Base::Runtime::IEventListener
{
public:
- virtual ~_ILiveboxTouchEventListener() {};
+ virtual ~_IAppWidgetTouchEventListener() {};
virtual int OnTouchEventRecevied(int eventType, double timestamp, double x, double y) = 0;
};
}} // Tizen::Shell
-#endif /* _FSHELL_ILIVEBOX_TOUCH_EVENT_LISTENER_H_ */
+#endif /* _FSHELL_IAPPWIDGET_TOUCH_EVENT_LISTENER_H_ */
+++ /dev/null
-//
-// 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_LiveboxManagerIpcMessage.h
- * @brief This is the header file for the LiveboxManagerService Ipc message types.
- */
-
-#include <FAppTypes.h>
-#include <FSystem.h>
-
-#include "ipc/ipc_message_macros.h"
-#include "FIo_IpcCommonParamTraits.h"
-#include "FIo_IpcMessageStart.h"
-
-
-#define IPC_MESSAGE_START LiveboxManagerServiceStart
-
-// Message to service
-IPC_SYNC_MESSAGE_CONTROL3_1(LiveboxManager_RequestUpdate, Tizen::Base::String, Tizen::Base::String, Tizen::Base::String, result)
-IPC_SYNC_MESSAGE_CONTROL2_1(LiveboxManager_RequestUpdateInstance, Tizen::Base::String, Tizen::Base::String, result)
-
-IPC_SYNC_MESSAGE_CONTROL3_1(LiveboxManager_RequestSharedMemoryId, Tizen::Base::String, int, int, int)
-IPC_SYNC_MESSAGE_CONTROL3_1(LiveboxManager_RequestSharedMemoryIdForPD, Tizen::Base::String, int, int, int)
-IPC_SYNC_MESSAGE_CONTROL3_1(LiveboxManager_RequestSyncSharedMemory, Tizen::Base::String, int, int, result)
-IPC_SYNC_MESSAGE_CONTROL1_1(LiveboxManager_RequestSyncSharedMemoryForPD, Tizen::Base::String, result)
-IPC_SYNC_MESSAGE_CONTROL1_1(LiveboxManager_RequestReleaseSharedMemory, Tizen::Base::String, result)
-IPC_SYNC_MESSAGE_CONTROL1_1(LiveboxManager_RequestReleaseSharedMemoryForPD, Tizen::Base::String, result)
-
-// Message from service
-IPC_MESSAGE_CONTROL5(LiveboxManager_SendTouchEvent, Tizen::Base::String, int, double, double, double)
-IPC_MESSAGE_CONTROL5(LiveboxManager_SendTouchEventForPD, Tizen::Base::String, int, double, double, double)
+++ /dev/null
-//
-// 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_LiveboxPopupProviderImpl.h
- * @brief This is the header file for the _LiveboxPopupProviderImpl class.
- *
- * This header file contains the declarations of the %_LiveboxPopupProviderImpl class.
- */
-
-#ifndef _FSHELL_INTERNAL_LIVEBOX_POPUP_PROVIDER_IMPL_H_
-#define _FSHELL_INTERNAL_LIVEBOX_POPUP_PROVIDER_IMPL_H_
-
-#include <FBaseObject.h>
-#include <FBaseString.h>
-
-namespace Tizen { namespace Shell
-{
-
-class LiveboxPopup;
-
-class _OSP_EXPORT_ _LiveboxPopupProviderImpl
-: public Tizen::Base::Object
-{
-public:
- _LiveboxPopupProviderImpl(const Tizen::Base::String& instanceId, double x, double y);
- virtual ~_LiveboxPopupProviderImpl();
-
- const Tizen::Base::String& GetInstanceId() const;
- result SetLiveboxPopup(Tizen::Shell::LiveboxPopup* pLiveboxPopup);
- Tizen::Shell::LiveboxPopup* GetLiveboxPopup() const;
- result RequestUpdateToLivebox();
-
-private:
- _LiveboxPopupProviderImpl();
- _LiveboxPopupProviderImpl(const _LiveboxPopupProviderImpl& rhs);
- _LiveboxPopupProviderImpl& operator =(const _LiveboxPopupProviderImpl& rhs);
-
-private:
- Tizen::Base::String __instanceId;
- LiveboxPopup* __pLiveboxPopup;
- double __x;
- double __y;
- int __width;
- int __height;
-};
-
-} /* namespace Livebox */
-}
-#endif /* _FSHELL_INTERNAL_LIVEBOX_POPUP_PROVIDER_IMPL_H_ */
+++ /dev/null
-//
-// 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_LiveboxManagerImpl.h
- * @brief This is the header file for the _LiveboxProviderManagerImpl class.
- *
- * This header file contains the declarations of the _LiveboxProviderManagerImpl class.
- */
-
-#ifndef FShell_LIVEBOX_PROVIDER_MANAGERIMPL_H_
-#define FShell_LIVEBOX_PROVIDER_MANAGERIMPL_H_
-
-#include <unique_ptr.h>
-#include <FBaseObject.h>
-#include <FBaseColHashMapT.h>
-#include <FBaseColIMap.h>
-#include <FAppTypes.h>
-#include <FAppIAppControlProviderEventListener.h>
-
-
-namespace Tizen { namespace Shell {
-
-class LiveboxFrame;
-class LiveboxPopup;
-
-class ILiveboxProviderFactory;
-class ILiveboxPopupProviderFactory;
-class LiveboxProvider;
-class LiveboxPopupProvider;
-class _ILiveboxTouchEventListener;
-class _LiveboxManagerProxy;
-
-
-class _OSP_EXPORT_ _LiveboxProviderManagerImpl
- : public Tizen::App::IAppControlProviderEventListener
- , public Tizen::Base::Object
-{
-public:
- static _LiveboxProviderManagerImpl* GetInstance();
-
- // public APIs
- result SetLiveboxProviderFactory(ILiveboxProviderFactory& factory);
- result SetLiveboxPopupProviderFactory(ILiveboxPopupProviderFactory& factory);
- result RequestUpdate(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Base::String& argument);
- result AddLivebox(const Tizen::App::AppId& providerAppId, const Tizen::Base::String& providerName, const Tizen::Base::String& text, const Tizen::Base::String& userInfo);
-
- // internal APIs
- result RequestUpdateInstance(const Tizen::Base::String& instanceId, const Tizen::Base::String& argument = L"");
-
- result RequestSharedMemoryId(const Tizen::Base::String& instanceId, int width, int height, int& shmId);
- result RequestSharedMemoryIdForPD(const Tizen::Base::String& instanceId, int width, int height, int& shmId);
- result RequestSyncSharedMemory(const Tizen::Base::String& instanceId, int width, int height);
- result RequestSyncSharedMemoryForPD(const Tizen::Base::String& instanceId);
- result RequestReleaseSharedMemory(const Tizen::Base::String& instanceId);
- result RequestReleaseSharedMemoryForPD(const Tizen::Base::String& instanceId);
-
- // internal
- result SetLiveboxTouchEventListener(const Tizen::Base::String& instanceId, _ILiveboxTouchEventListener& listener);
- result SetLiveboxPopupEventListener(_ILiveboxTouchEventListener& listener);
-
- result ForwardTouchEvent(const Tizen::Base::String& instanceId, int eventType, double timeStamp, double x, double y);
- result ForwardTouchEventForPD(const Tizen::Base::String& instanceId, int eventType, double timeStamp, double x, double y);
-
- // helper
-// static result ExtractAppIdAndProviderName(const Tizen::Base::String& providerId, Tizen::App::AppId& appId, Tizen::Base::String& providerName);
- result ValidateApplicationAttributeForLivebox(void);
-
- void TerminateAppIfInvalidState();
-
-private:
- _LiveboxProviderManagerImpl();
- virtual ~_LiveboxProviderManagerImpl();
- result Construct();
-
- result CreateLivebox(const Tizen::Base::String& name, const Tizen::Base::String& instanceId, int width, int height, const Tizen::Base::String& userInfo);
- result UpdateLivebox(const Tizen::Base::String& instanceId, int width, int height, const Tizen::Base::String& argument);
- result ResizeLivebox(const Tizen::Base::String& instanceId, int width, int height);
- result RemoveLivebox(const Tizen::Base::String& instanceId, bool terminateIfFinished);
- result CreateLiveboxPopupProvider(const Tizen::Base::String& instanceId, const Tizen::Base::String& providerName, const Tizen::Base::String& userInfo, double x, double y, int width, int height);
- result DestroyLiveboxPopupProvider(const Tizen::Base::String& instanceId);
-
- bool ContainsLivebox(const Tizen::Base::String& instanceId) const;
-
- virtual void OnAppControlRequestReceived(RequestId reqId, const Tizen::Base::String& operationId, const Tizen::Base::String* pUriData, const Tizen::Base::String* pMimeType, const Tizen::Base::Collection::IMap* pExtraData);
-
- result HandleLiveboxRequest(const Tizen::Base::String& operationId, const Tizen::Base::Collection::IMap* pArgs);
- result HandleLiveboxPopupRequest(const Tizen::Base::String& operationId, const Tizen::Base::Collection::IMap* pArgs);
-
-private:
- // for Livebox
- ILiveboxProviderFactory* __pLiveboxFactory;
- Tizen::Base::Collection::HashMapT<Tizen::Base::String, LiveboxProvider*> __liveboxProviders;
- Tizen::Base::Collection::HashMapT<Tizen::Base::String, _ILiveboxTouchEventListener*> __touchEventListeners;
-
- // for LiveboxPopup
- ILiveboxPopupProviderFactory* __pLiveboxPopupProviderFactory;
- LiveboxPopupProvider* __pLiveboxPopupProvider;
- _ILiveboxTouchEventListener* __LiveboxPopupTouchEventListener;
-
-// bool __messageReceived;
-};
-
-}} // Tizen::Shell
-#endif /* FShell_LIVEBOX_PROVIDER_MANAGERIMPL_H_ */
int GetBadgeCount(const char* pkgName) const;
private:
- int __notifyPrivitId;
- int __notifyPrivitIdForOngoing;
+ int __notifyPrivateId;
+ int __notifyPrivateIdForOngoing;
Tizen::Base::Collection::LinkedListT<IBadgeEventListener*> __badgeEventListenerList;
}; //_NotificationManagerImpl
class _IUiEventManager;
}} // Tizen::Ui
-
namespace Tizen { namespace Ui { namespace Animations {
class _RootVisualElement;
}}} // Tizen::Ui::Animations
_QuickPanelFrame(const _QuickPanelFrame& rhs);
_QuickPanelFrame& operator =(const _QuickPanelFrame& rhs);
+ virtual Tizen::Ui::_UiTouchEventDelivery OnPreviewTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
+ virtual Tizen::Ui::_UiTouchEventDelivery OnPreviewTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
+ virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
+ virtual bool OnTouchCanceled(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
+
virtual void OnDraw(void);
private:
_QuickPanelFramePresenter* __pQuickPanelFramePresenter;
Tizen::Ui::_IUiEventManager* __pEventManager;
_QuickPanelFrameLayer* __pLayer;
- Evas_Object* pminicontrol;
+ Evas_Object* __pMinicontrol;
+ bool __isFreeze;
+ bool __isBubbled;
}; // _QuickPanelFrame
}}// Tizen::Shell
result RemoveShortcutRequestListener(IShortcutRequestListener& listener);
// internal
- void SetLiveboxRequestHandlerCallback(int(*PShortcutRequestCallback)(const char *appid, const char *name, int type, const char *content_info, const char *icon, int pid, double period, void *data));
+ void SetAppWidgetRequestHandlerCallback(int(*PShortcutRequestCallback)(const char *appid, const char *name, int type, const char *content_info, const char *icon, int pid, double period, void *data));
const Tizen::Base::Collection::ArrayListT<IShortcutRequestListener*>* GetShortcutRequestListenerList(void) const;
private: