2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FShellAppWidgetView.h
20 * @brief This is the header file for the %AppWidgetView class.
22 * This header file contains the declarations of the %AppWidgetView class.
25 #ifndef _FSHELL_APPWIDGET_VIEW_H_
26 #define _FSHELL_APPWIDGET_VIEW_H_
28 #include <FAppTypes.h>
29 #include <FUiContainer.h>
31 namespace Tizen { namespace Base
36 namespace Tizen { namespace Shell
39 class IAppWidgetViewEventListener;
40 class AppWidgetProviderInfo;
43 * @class AppWidgetView
44 * @brief This class provides the view control for a AppWidgetViewer.
47 * The %AppWidgetView shows a drawn buffer by AppWidgetProvider.
50 class _OSP_EXPORT_ AppWidgetView
51 : public Tizen::Ui::Container
55 * The object is not fully constructed after this constructor is called.
56 * For full construction, the Construct() method must be called after calling this constructor.
63 * This destructor overrides Tizen::Base::Object::~Object().
67 virtual ~AppWidgetView(void);
70 * Initializes this instance of %AppWidgetView with the specified parameter.
73 * @feature %http://tizen.org/feature/shell.appwidget
\r
74 * @return An error code
75 * @param[in] appId The AppId of the installed application
76 * @param[in] providerName The name of the AppWidget provider
77 * @param[in] rect An instance of the FloatRectangle class @n
78 * This instance represents the x and y coordinates of the top-left corner @n
79 * of the created window along with its width and height. @n
80 * @exception E_SUCCESS The method is successful.
81 * @exception E_INVALID_ARG A specified input parameter is invalid.
82 * @exception E_APP_NOT_INSTALLED The application is not installed.
83 * @exception E_OBJ_NOT_FOUND The specified AppWidget provider is not found.
84 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
\r
85 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
\r
86 * remarks Before calling this method, check whether the feature is supported by %Tizen::System::SystemInfo::GetValue() methods.
\r
88 result Construct(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::FloatRectangle& rect);
91 * Initializes this instance of %AppWidgetView with the specified parameter.
94 * @feature %http://tizen.org/feature/shell.appwidget
95 * @return An error code
96 * @param[in] appId The AppId of the installed application
97 * @param[in] providerName The name of the AppWidget provider
98 * @param[in] rect An instance of the FloatRectangle class @n
99 * This instance represents the x and y coordinates of the top-left corner @n
100 * of the created window along with its width and height. @n
101 * @param[in] userInfo Extra data to be delivered to AppWidget provider
102 * @exception E_SUCCESS The method is successful.
103 * @exception E_INVALID_ARG A specified input parameter is invalid.
104 * @exception E_APP_NOT_INSTALLED The application is not installed.
105 * @exception E_OBJ_NOT_FOUND The specified AppWidget provider is not found.
106 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
\r
107 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
\r
108 * remarks Before calling this method, check whether the feature is supported by %Tizen::System::SystemInfo::GetValue() methods.
110 result Construct(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::FloatRectangle& rect, const Tizen::Base::String& userInfo);
113 * Gets a AppWidgetProviderInfo of the specified AppWidget provider.
117 * @return A pointer to the AppWidgetProviderInfo of the specified AppWidgetProvider@n
118 * else @c null if an error occurs
119 * @exception E_SUCCESS The method is successful.
120 * @exception E_APP_NOT_INSTALLED The application is not installed.
121 * @exception E_OBJ_NOT_FOUND The specified AppWidget provider is not found.
122 * @remarks The specific error code can be accessed using the GetLastResult() method.
124 AppWidgetProviderInfo* GetAppWidgetProviderInfoN(void) const;
127 * Adds an IAppWidgetViewEventListener instance. @n
130 * @return An error code
131 * @param[in] listener The listener to add @n
132 * The listener must be allocated at heap, not stack.
133 * @exception E_SUCCESS The method is successful.
134 * @exception E_OBJ_ALREADY_EXIST The listener has already been added.
135 * @see RemoveAppWidgetViewEventListener()
137 result AddAppWidgetViewEventListener(IAppWidgetViewEventListener& listener);
140 * Removes an IAppWidgetViewEventListener instance. @n
141 * The removed listener cannot listen to the events when they are fired.
144 * @return An error code
145 * @param[in] listener The listener to remove @n
146 * The listener should be referring to previously allocated instance which is passed as an argument to AddAppWidgetViewEventListener().
147 * @exception E_SUCCESS The method is successful.
148 * @exception E_OBJ_NOT_FOUND The specified listener cannot be found.
149 * @see AddAppWidgetViewEventListener()
151 result RemoveAppWidgetViewEventListener(IAppWidgetViewEventListener& listener);
155 // This method is for internal use only. Using this method can cause behavioral, security-related,
156 // and consistency-related issues in the application.
158 // Following method is reserved and may change its name at any time without prior notice.
160 virtual void AppWidgetView_Reserved1(void) {}
163 // This method is for internal use only. Using this method can cause behavioral, security-related,
164 // and consistency-related issues in the application.
166 // Following method is reserved and may change its name at any time without prior notice.
168 virtual void AppWidgetView_Reserved2(void) {}
171 // This method is for internal use only. Using this method can cause behavioral, security-related,
172 // and consistency-related issues in the application.
174 // Following method is reserved and may change its name at any time without prior notice.
176 virtual void AppWidgetView_Reserved3(void) {}
179 // This method is for internal use only. Using this method can cause behavioral, security-related,
180 // and consistency-related issues in the application.
182 // Following method is reserved and may change its name at any time without prior notice.
184 virtual void AppWidgetView_Reserved4(void) {}
187 // This method is for internal use only. Using this method can cause behavioral, security-related,
188 // and consistency-related issues in the application.
190 // Following method is reserved and may change its name at any time without prior notice.
192 virtual void AppWidgetView_Reserved5(void) {}
196 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
198 AppWidgetView(const AppWidgetView& rhs);
201 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
203 AppWidgetView& operator =(const AppWidgetView& rhs);
208 #endif // _FSHELL_APPWIDGET_VIEW_H_