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 * @return An error code
74 * @param[in] appId The AppId of the installed application
75 * @param[in] providerName The name of the AppWidget provider
76 * @param[in] rect An instance of the FloatRectangle class @n
77 * This instance represents the x and y coordinates of the top-left corner @n
78 * of the created window along with its width and height. @n
79 * @exception E_SUCCESS The method is successful.
80 * @exception E_INVALID_ARG A specified input parameter is invalid.
81 * @exception E_APP_NOT_INSTALLED The application is not installed.
82 * @exception E_OBJ_NOT_FOUND The specified AppWidget provider is not found.
84 result Construct(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::FloatRectangle& rect);
87 * Initializes this instance of %AppWidgetView with the specified parameter.
90 * @return An error code
91 * @param[in] appId The AppId of the installed application
92 * @param[in] providerName The name of the AppWidget provider
93 * @param[in] rect An instance of the FloatRectangle class @n
94 * This instance represents the x and y coordinates of the top-left corner @n
95 * of the created window along with its width and height. @n
96 * @param[in] userInfo Extra data to be delivered to AppWidget provider
97 * @exception E_SUCCESS The method is successful.
98 * @exception E_INVALID_ARG A specified input parameter is invalid.
99 * @exception E_APP_NOT_INSTALLED The application is not installed.
100 * @exception E_OBJ_NOT_FOUND The specified AppWidget provider is not found.
102 result Construct(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Graphics::FloatRectangle& rect, const Tizen::Base::String& userInfo);
105 * Gets a AppWidgetProviderInfo of the specified AppWidget provider.
109 * @return A pointer to the AppWidgetProviderInfo of the specified AppWidgetProvider@n
110 * else @c null if an error occurs
111 * @exception E_SUCCESS The method is successful.
112 * @exception E_APP_NOT_INSTALLED The application is not installed.
113 * @exception E_OBJ_NOT_FOUND The specified AppWidget provider is not found.
114 * @remarks The specific error code can be accessed using the GetLastResult() method.
116 AppWidgetProviderInfo* GetAppWidgetProviderInfoN(void) const;
119 * Adds an IAppWidgetViewEventListener instance. @n
122 * @return An error code
123 * @param[in] listener The listener to add @n
124 * The listener must be allocated at heap, not stack.
125 * @exception E_SUCCESS The method is successful.
126 * @exception E_OBJ_ALREADY_EXIST The listener has already been added.
127 * @see RemoveAppWidgetViewEventListener()
129 result AddAppWidgetViewEventListener(IAppWidgetViewEventListener& listener);
132 * Removes an IAppWidgetViewEventListener instance. @n
133 * The removed listener cannot listen to the events when they are fired.
136 * @return An error code
137 * @param[in] listener The listener to remove @n
138 * The listener should be referring to previously allocated instance which is passed as an argument to AddAppWidgetViewEventListener().
139 * @exception E_SUCCESS The method is successful.
140 * @exception E_OBJ_NOT_FOUND The specified listener cannot be found.
141 * @see AddAppWidgetViewEventListener()
143 result RemoveAppWidgetViewEventListener(IAppWidgetViewEventListener& listener);
147 // This method is for internal use only. Using this method can cause behavioral, security-related,
148 // and consistency-related issues in the application.
150 // Following method is reserved and may change its name at any time without prior notice.
152 virtual void AppWidgetView_Reserved1(void) {}
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_Reserved2(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_Reserved3(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_Reserved4(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_Reserved5(void) {}
188 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
190 AppWidgetView(const AppWidgetView& rhs);
193 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
195 AppWidgetView& operator =(const AppWidgetView& rhs);
200 #endif // _FSHELL_APPWIDGET_VIEW_H_