2 * Copyright 2013 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.1 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __DYNAMICBOX_UILITY_H
18 #define __DYNAMICBOX_UILITY_H
26 * @brief This file declares API of libdynamicbox library
31 * @addtogroup CAPI_DYNAMICBOX_UTILITY_MODULE
36 * @brief Creates an Object to create an elm_win object.
37 * @details Creating a new Object using Dynamic Box frame buffer.
39 * @param[in] id Instance Id
40 * @param[in] gbar 1 if this object is created for Glance Bar or 0 (for Dynamic Box)
42 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
43 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
44 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
45 * @return void* Object type
46 * @retval Address Valid evas object
47 * @retval @c NULL failed to create, dynamicbox_last_status() will returns reason of failure
49 extern void *dynamicbox_get_evas_object(const char *id, int gbar);
52 * @brief Set extra information for updated content.
54 * If the provider should give some hints to the viewer,
55 * such as title, icon and name, this function can set them.
56 * provider will send those information to the viewer when the
59 * @remarks This function only works with the buffer type inhouse provider.
60 * @param[in] id Dynamic Box Instance Id
61 * @param[in] content Content string that will pass to a Dynamic Box via dynamicbox_create interface when it is re-created.
62 * @param[in] title Human readable text for accessitility, summarized text for representing the content of a box.
63 * @param[in] icon Path of icon image file - alternative image content
64 * @param[in] name Name of a box - alternative text content
66 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
67 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
68 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
69 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
70 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error
71 * @retval #DBOX_STATUS_ERROR_NONE Successfully sent
73 extern int dynamicbox_set_extra_info(const char *id, const char *content, const char *title, const char *icon, const char *name);
76 * @brief Return values of dynamicbox programming interfaces: Operation is successfully done.
78 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
79 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
81 extern const int DBOX_DONE;
84 * @brief Return values of dynamicbox programming interfaces: Contents are updated.
86 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
87 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
89 extern const int DBOX_OUTPUT_UPDATED;
92 * @brief Return values of dynamicbox programming interfaces: Need to call the dynamicbox_need_to_update and dynamicbox_update_content.
94 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
95 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
97 extern const int DBOX_NEED_TO_SCHEDULE;
101 * @brief Return values of dynamicbox programming interfaces: Need to create a new instance.
104 extern const int DBOX_NEED_TO_CREATE;
107 * @brief Return values of dynamicbox programming interfaces: Need to do force update.
109 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
110 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
112 extern const int DBOX_FORCE_TO_SCHEDULE;
115 * @brief Return values of dynamicbox programming interfaces: Need to destroy this instance.
117 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
118 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
120 extern const int DBOX_NEED_TO_DESTROY;
123 * @brief Return values of dynamicbox programming interfaces: Need to update.
125 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
126 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
128 extern const int DBOX_NEED_TO_UPDATE;
131 * @brief System event type: System font is changed.
133 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
134 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
136 extern const int DBOX_SYS_EVENT_FONT_CHANGED;
139 * @brief System event type: System language is changed.
141 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
142 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
144 extern const int DBOX_SYS_EVENT_LANG_CHANGED;
147 * @brief System event type: System time is changed.
149 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
150 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
152 extern const int DBOX_SYS_EVENT_TIME_CHANGED;
155 * @brief System event type: MMC Status change event.
157 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
158 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
160 extern const int DBOX_SYS_EVENT_MMC_STATUS_CHANGED;
163 * @brief System event type: Region changed.
165 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
166 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
168 extern const int DBOX_SYS_EVENT_REGION_CHANGED;
171 * @brief System event type: Accessibility mode changed.
173 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
174 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
176 extern const int DBOX_SYS_EVENT_TTS_CHANGED;
179 * @brief System event type: Dynamic Box is paused.
181 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
182 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
184 extern const int DBOX_SYS_EVENT_PAUSED;
187 * @brief System event type: Dynamic Box is resumed.
189 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
190 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
192 extern const int DBOX_SYS_EVENT_RESUMED;
195 * @brief System event type: Dynamic Box instance is removed from a viewer.
197 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
198 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
200 extern const int DBOX_SYS_EVENT_DELETED;
203 * @brief Requests to schedule the update operation to a provider.
204 * Your DBox will get the update request, if the @a id is specified, specific box only will get it.
206 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
207 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
208 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
209 * @return If succes returns 0 or return less than 0
210 * @retval #DBOX_STATUS_ERROR_NONE Successfully triggered
211 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
212 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Not enough memory
213 * @retval #DBOX_STATUS_ERROR_NOT_EXIST Given id instance is not exist
214 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED Permission denied
215 * @retval #DBOX_STATUS_ERROR_DISABLED in case of direct request for updating is disabled
217 extern int dynamicbox_request_update(const char *id);
220 * @brief Send a freeze request to the viewer (homescreen)
222 * The viewer will get this request via event callback.
223 * Then it should freeze its scroller or stop moving the dynamicbox.
225 * @remarks If the viewer doesn't care this request, this will has no effect.
226 * @param[in] dboxid Dynamic Box Package Id
227 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
229 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
230 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
231 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
233 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
234 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
235 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED Permission denied
236 * @retval #DBOX_STATUS_ERROR_FAULT Failed to send requet
237 * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
238 * @see dynamicbox_release_scroller()
240 extern int dynamicbox_freeze_scroller(const char *dboxid, const char *id);
243 * @brief Send a release request to the viewer (homescreen)
245 * The viewer will get this request via event callback.
246 * Then it should release its scroller or continue moving the dynamicbox.
248 * @remarks If the viewer doesn't care this request, this will has no effect.
249 * @param[in] dboxid Dynamic Box Package Id
250 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
252 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
253 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
254 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
256 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED Permission denied
257 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
258 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
259 * @retval #DBOX_STATUS_ERROR_FAULT Failed to send requet
260 * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
261 * @see dynamicbox_freeze_scroller()
263 extern int dynamicbox_thaw_scroller(const char *dboxid, const char *id);