public:
/**
- * Gets the AppWidget manager instance.
+ * Gets the %AppWidgetManager instance.
*
* @since 2.1
*
* @return An error code
* @param[in] pAppWidgetPopup The pointer to the AppWidgetPopup instance that is set to AppWidget
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The pointer to AppWidgetFrame is @c null, or not constructed as yet.
+ * @exception E_INVALID_ARG The pointer to AppWidgetPopup is @c null, or not constructed as yet.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks
* - This method should be called only in OnAppWidgetPopupProviderInitializing().
* @param[in] userInfo User information that is specified when the AppWidget is added
* @remarks AppWidgetFrame should be created and set here. @n
* If this method returns @c false, the AppWidget provider will be terminated.
+ * @see AppWidgetProviderManager::AddAppWidget()
* @see SetAppWidgetFrame()
*
* The following example demonstrates how to initialize the %AppWidgetProvider instance.
*
* using namespace Tizen::Shell;
*
- * void MyAppWidgetProvider::OnAppWidgetProviderInitializing(int width, int height, const String& userInfo)
+ * bool
+ * MyAppWidgetProvider::OnAppWidgetProviderInitializing(float width, float height, const String& userInfo)
* {
- * AppWidgetFrame* pFrame = new MyAppWidgetProviderFrame();
- * pFrame->Construct(Dimension(width, height));
- * __pLabel = new Label();
+ * AppWidgetFrame* pFrame = new MyAppWidgetFrame();
*
- * Rectangle bounds = GetBounds();
- * __pLabel->Construct(bounds, L"TIZEN");
- * AddControl(__pLabel);
+ * pFrame->Construct(FloatDimension(width, height));
* this->SetAppWidgetFrame(pFrame);
* pFrame->Show();
*
virtual void OnAppWidgetProviderTerminating(void) = 0;
/**
- * Called when the correspondent AppWidget is removed from AppWidget viewer application. (Home or Lock screen, and so on). @n
+ * Called when the correspondent AppWidget is removed from AppWidget viewer application(such as the Home screen). @n
* If AppWidget provider state is stored in a persistent storage such as registry or DB, it can be destroyed by implementing this pure virtual function.
*
- *
* @since 2.1
*
* @remarks This method is called after the OnAppWidgetProviderTerminating() method is called.
* @param[in] argument User information to update the AppWidget provider @n
* This parameter is delivered from AppWidgetProvider::RequestUpdate().
* @remarks This method is called when UpdatePeriod timer is expired or AppWidgetManager::RequestUpdate() is called. @n
- * If this method returns @c false, the AppWidget provider will be terminated.
+ * If this method returns @c false, the AppWidget provider will be removed.
*/
virtual bool OnAppWidgetProviderUpdating(const Tizen::Base::String& argument) = 0;
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks
* - This method should be called only within the OnAppWidgetProviderInitializing() method.
- * - The AppWidgetFrame instance ownership is transferred to the platform. After AppWidgetProvider::OnAppWidgetProviderTerminating() is called, the AppWidgetPopup instance is removed automatically. The %AppWidgetFrame instance reuse is not allowed.
+ * - The AppWidgetFrame instance ownership is transferred to the platform. After AppWidgetProvider::OnAppWidgetProviderTerminating() is called, the AppWidgetFrame instance is removed automatically. The %AppWidgetFrame instance reuse is not allowed.
*/
result SetAppWidgetFrame(AppWidgetFrame* pAppWidgetFrame);
Tizen::Base::String GetName(void) const;
/**
- * Gets the display name of an AppWidget. @n
+ * Gets the display name of an AppWidget provider @n
* If the system language setting is changed, the %GetDisplayName() method returns the localized application name.
* The display name is displayed in applications showing AppWidget such as Launcher, and so on.
*
Tizen::Base::String GetIconPath(void) const;
/**
- * Gets the ID of the application that exports AppContorl to configure the AppWidget.
+ * Gets the ID of the application that exports AppControl to configure the AppWidget.
*
* @since 2.1
*
- * @return The ID of the application that exports AppContorl to configure the AppWidget @n
+ * @return The ID of the application that exports AppControl 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 AppWidget configuration.
* using namespace Tizen::Shell;
*
* AppWidgetProviderInfo* pProviderInfo = AppWidgetManager::GetInstance()->GetAppWidgetProviderInfoN(appId, providerName);
- * if( !pProviderInfo->GetConfigurationAppControlAppId().IsEmpty )
+ * if (!pProviderInfo->GetConfigurationAppControlAppId().IsEmpty())
* {
* AppControl* pAc = AppManager::FindAppControlN(pProviderInfo->GetConfigurationAppControlAppId(), L"http://tizen.org/appcontrol/operation/appwidget/configuration");
- *
- * HashMap map();
- * map.Construct();
- * String key = L"http://tizen.org/appcontrol/data/provider_name";
- * String value = pProviderInfo->GetName();
- * map.Add(&key, &value );
- *
- * pAc->Start(null, null, &map, null);
- * delete pAc;
+ * if (pAc)
+ * {
+ * HashMap extra();
+ * extra.Construct();
+ * String key = L"http://tizen.org/appcontrol/data/provider_name";
+ * extra.Add(&key, providerName );
+ *
+ * pAc->Start(null, null, &extra, this);
+ * delete pAc;
+ * }
* }
* delete pProviderInfo;
* @endcode
*
* @remarks
* - Default AppWidget provider providing AppWidget that represents application.
- * - Home application can show AppWidget instead of icon and text for applications that includes default AppWidget provider.
+ * - Home application can show AppWidget instead of shortcut that is consisted of icon and text for applications that includes default AppWidget provider.
*/
bool IsDefault(void) const;
Tizen::Graphics::FloatDimension GetSize(void) const;
/**
- * Gets the image path for preview.
+ * Gets the image path for preview for the size.
*
* @since 2.1
*
* @since 2.1
*
* The %IAppWidgetPopupProviderFactory interface is the factory interface for creating the AppWidgetPopupProvider instance.
- * The AppWidgetManager instance calls CreateInstance() when an instance of IAppWidgetPopupProvider is required.
+ * The AppWidgetProviderManager instance calls CreateInstance() when an instance of AppWidgetPopupProvider is required.
*
- * @see AppWidgetManager
+ * @see AppWidgetProviderManager
*/
class _OSP_EXPORT_ IAppWidgetPopupProviderFactory
{
/**
* Creates an 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.
+ * Applications that provide the AppWidget functionality must implement this pure virtual function.
*
* @since 2.1
*
* @param[in] providerName The name of the AppWidget provider
* @param[in] userInfo User information that specifies when the AppWidget is added
+ * @see AppWidgetProviderManager::AddAppWidget()
*/
virtual AppWidgetPopupProvider* CreateInstance(const Tizen::Base::String& providerName, const Tizen::Base::String& userInfo) = 0;
* @since 2.1
*
* The %IAppWidgetProviderFactory interface defines a factory for the AppWidgetProvider creation.
- * The AppWidgetManager instance calls CreateInstance() when an instance of %AppWidgetProvider is required.
+ * The AppWidgetProviderManager instance calls CreateInstance() when an instance of %AppWidgetProvider is required.
* Applications that provide the %AppWidgetProvider functionality must implement this interface.
*
- * @see AppWidgetManager
+ * @see AppWidgetProviderManager
*/
class _OSP_EXPORT_ IAppWidgetProviderFactory
{
/**
* Called when the AppWidgetProvider creation request is received from the appwidget service. @n
- * Applications that provide the %AppWidgetProvider functionality must implement this listener.
+ * Applications that provide the %AppWidgetProvider functionality must implement this pure virtual function.
*
* @since 2.1
*
* @param[in] providerName The name of the AppWidget provider
* @param[in] width The width of the AppWidget
* @param[in] height The height of the AppWidget
- * @param[in] userInfo User information that specifies when the AppWidget is added
+ * @param[in] userInfo User information that is specified when the AppWidget is added
+ * @see AppWidgetProviderManager::AddAppWidget()
*/
virtual AppWidgetProvider* CreateInstance(const Tizen::Base::String& providerName, float width, float height, const Tizen::Base::String& userInfo) = 0;
/**
* @interface IAppWidgetRequestListener
- * @brief This interface defines a listener for an AppWidget viewer (for example, Home screen, Lock screen) that receives request to add AppWidget.
+ * @brief This interface defines a listener for an AppWidget viewer (such as the Home screen) that receives request to add AppWidget.
*
* @since 2.1
*
* The following example demonstrates how to start the application when the added shortcut is selected by the user.
* @code
-#include <FShell.h>
-#include <FApp.h>
+ #include <FShell.h>
+ #include <FApp.h>
-using namespace Tizen::Shell;
-using namespace Tizen::App;
+ using namespace Tizen::Shell;
+ using namespace Tizen::App;
- if( uriData.IsEmpty() )
+ if( uriData.IsEmpty() )
+ {
+ AppManager::GetInstance()->LaunchApplication(appId, null);
+ }
+ else
+ {
+ AppControlpAc = AppManager::FindAppControlN(App::GetInstance()->GetAppId(), L"http://tizen.org/appcontrol/operation/view");
+ if( pAc )
{
- AppManager::GetInstance()->LaunchApplication(appId, null);
- }
- else
- {
- AppControlpAc = AppManager::FindAppControlN(App::GetInstance()->GetAppId(), L"http://tizen.org/appcontrol/operation/view");
- if( pAc )
- {
- pAc->Start(*uriData, null, null, null);
- delete pAc;
- }
+ pAc->Start(*uriData, null, null, null);
+ delete pAc;
}
+ }
@endcode
*/
class _OSP_EXPORT_ IShortcutRequestListener